Link to home
Start Free TrialLog in
Avatar of Grendel666
Grendel666

asked on

Can I suppress a trigger error in Reports?

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.
Avatar of Mark Geerlings
Mark Geerlings
Flag of United States of America image

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.
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.
Avatar of Grendel666
Grendel666

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of Mark Geerlings
Mark Geerlings
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.