Re: Running Reports from Forms - detect error?

From: Bob Sauer <rsauer_at_census.gov>
Date: Wed, 29 Apr 1998 08:16:44 -0400
Message-ID: <35471A2C.BCF26EC6_at_census.gov>


I have been playing with the same problem. I set up a report containing a graphic display object to fail by renaming the ogd file the graphic object was pointing to. When I called the report with the run_product built in, reports returned an error however I was unable to trap it with an on-error trigger or with form_success or form_failure. Apparently forms thought that the run_product built in executed successfully even though the report didn't. Because I need to commit or rollback data based on the success or failure of the report, I had to come up with a work around.

What I ended up doing was to pass the ERRFILE parameter in the run_product to reports. When the report is finished (run it synchronously) I open the error file and read through it, using the text_io package, looking for the substring 'ERR' . If I don't find it, I'm good to go, otherwise I raise an error. Real kludgy, extra overhead, more maintenance, but it works. If anyone has a more efficient work around, I'd like to use it.

Bob

Ng TC wrote:

> Hi,
>
> I am using the following in my Forms to run a Report:
>
> Run_Product(REPORTS,:pfrp.rep_id,SYNCHRONOUS,RUNTIME,FILESYSTEM,tmrlist);
>
> How do I detect if the Report runs to completion, or if it had encountered
> any errors??
>
> Thanks.
>
> Tse Chong
>
> email: tcng_at_yas.com.sg
Received on Wed Apr 29 1998 - 14:16:44 CEST

Original text of this message