Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Running multiple reports using Revelation Reporter (Functions/Subroutines/Programs,Reporting and Printing) ====== ====== ====== ==== Created at 03 JAN 1997 01:03PM ==== The Revelation Reporter uses OpenEngine to access all non-ODBC data, including Linear Hash tables. This presents a problem if the Reporter is called multiple times from a Basic+ script, since OpenEngine will be executing the Basic+ script when Reporter needs to use OpenEngine to access data. To work around the blocking effect, the Basic+ script must complete, then the Reporter must execute the report, then the Basic+ script must be instructed to run the next report. Using the call-back feature in Utility("RUNWIN"), this sample code shows how to sequentially run multiple reports using the Revelation Reporter. This check-out contains the following items: Window (source and executable): REVRPT Insert: REVRPT_EQUATES Procedure (source, debug, and executable): REVRPT [[http://www.revelation.com/o4wtrs/KB_Articles/KB0076_files/RevRpt.zip|{{kb0076_1.png}} ]] Note: There are no events on the REVRPT window; instead, it uses QuickEvents to call the REVRPT procedure, passing an instruction identifier. See the description of the example, below. Here is how the RevRpt example works: 1. Using a Basic+ script (e.g. an event script), you call the REVRPT procedure passing CMD_RUNRPT$ (defined in REVRPT_EQUATES) and an @fm-delimited list of reports to execute. 2. The REVRPT procedure (in Execute:), saves the list of reports to run in a labelled common (named global) variable. 3. The REVRPT procedure (in Execute:), starts the REVRPT window, which displays which report is currently running to the user. 4. The CREATE event on the REVRPT window uses a QuickEvent to call the REVRPT procedure passing CMD_CREATE$ 5. The REVRPT procedure (in Create:), calls the REVRPT procedure (itself) passing CMD_NEXT$, in order to print the first report. 6. The REVRPT procedure (in ExecNext:), calls Utility("RUNWIN") to execute the reporter, specifying that when the Reporter is finished, REVRPT should be called back with CMD_NEXT$ (to run the next report). The source for the REVRPT procedure can be viewed on-line by clicking on the following icon: [[http://www.revelation.com/o4wtrs/KB_Articles/KB0076_files/RevRpt.txt|{{kb0076_2.png}} ]] kb/kb_articles/kb0076.txt Last modified: 2024/01/30 13:36by 127.0.0.1