Solved

Can I suppress a trigger error in Reports?

Posted on 2004-10-06
5
1,569 Views
Last Modified: 2008-01-09
Hi all,

I have a report that generates a blank page if no data is found.  What I'm trying to do is display a custom error message if no data is found and return the user to the parameter form.

Most of the work is performed in the After Parameter Form trigger, so I need to check in there.

I did put something in there to return FALSE if no data is found, but that displays the Reports generated error : "REP-0771 : After Form trigger failed."

I'd like to suppress this message and just display my own, e.g. "No data found, returning to parameter form" or something like that.

Any ideas?  Or any other way of stopping the blank page appearing if no data is found, without putting all the SQL in the process that launches the report?

Thanks,

Grendel.
0
Comment
Question by:Grendel666
  • 3
  • 2
5 Comments
 
LVL 34

Expert Comment

by:Mark Geerlings
ID: 12240072
One option may be to do the checking in a validation trigger (or in a program unit called from a validation trigger) on the list item in the parameter form, instaed of in the After Parameter Form trigger.  If that returns FALSE, the user will still be in the parameter form.
0
 
LVL 34

Expert Comment

by:Mark Geerlings
ID: 12240094
Oops! I intended that to read:
"... on the last item..."
not:
"... on the list item..."

I see that I also spelled "instead" wrong, but that probably was not confusing.
0
 
LVL 1

Author Comment

by:Grendel666
ID: 12246600
Thanks Mark,

That works, but if I return FALSE from that trigger, I get another system error : "REP-0546 : Invalid parameter input."

Any ideas how to get rid of this one?
0
 
LVL 34

Accepted Solution

by:
Mark Geerlings earned 250 total points
ID: 12248288
Not in Oracle Reports - its not very sophisticated at accepting user input.  We use the Parameter Form for simple reports, but if we need any complex criteria or conditions, we use an Oracle Form to gather the parameters, then call the report and pass the parameters (bypassing the parameter form).
0
 
LVL 1

Author Comment

by:Grendel666
ID: 12248327
Thanks Mark,

Looks like I'll have to do some kind of workaround like that.

Thanks for your help, I'll assign you the points.

Grendel.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now