How to tell if a report was started
Posted in 2006
I have a 4GL (7.13) app that makes use of several different reports based on various circumstances in the data. The application has a general error function that is accessed via "WHENEVER ERROR CALL error_function" at the start of the MAIN body of the app. I would like this error function to handle cleanup of open reports so that a retry attempt or the next data record or whatever can proceed to reuse the reports. So, in my error function, is there a way to tell which reports have been started? Or to call "FINISH REPORT" on each possible report without the app blowing up when it encounters one that was never started? Other than creating global variables (ick) to keep track of each report, I haven't come up with a solution. I tried wrapping the FINISH statements in: WHENEVER ERROR CONTINUE FINISH REPORT a FINISH REPORT b ... WHENEVER ERROR CALL error_function This did not seem to work, as I saw an error on the screen about a report having not been started, but I am still working on manufacturing an error "properly" to test. Thanks, Kimberly