Re: Nested Report Statments in I-4gl
Posted in 1993
In article <hlt.734989664@napcc-hp> hlt@napcc-hp (Harold Trammel) writes: >In our veterinary medical records database, we need to be able to generate >a single case summary which uses data from up to 12 different tables. > > [...] > >Options that I see: > - send each report to a separate outfile and join them with a > Unix call after the report is finished We use this approach on several accounting-type reports that need a summary report followed by a detail report for each of several accounts, all followed by a grand totals report. This must be generated by one report run. The program uses three temp files similar to the following: let grand_file = "/tmp/grand.out" # or whatever - the actual code let summary_file = "/tmp/summary.out" # incorporates the process-ID let detail_file = "/tmp/detail.out" start report grand_rpt to grand_file foreach account_cursor start report summary_rpt to summary_file start report detail_rpt to detail_file foreach transaction_cursor output to report summary_rpt (...) output to report detail_rpt (...) output to report grand_rpt (...) end foreach finish report summary_rpt run "cat /tmp/summary.out" run "rm /tmp/summary.out" finish report detail_rpt run "cat /tmp/detail.out" run "rm /tmp/detail.out" end foreach finish report grand_rpt run "cat /tmp/grand.out" run "rm /tmp/grand.out" This approach is pretty straightforward for us, since we send this report to standard out. Hope this helps, Walt. -- Walt Hultgren Internet: walt@rmy.emory.edu (IP 128.140.8.1) Emory University UUCP: {...,gatech,rutgers,uunet}!emory!rmy!walt 954 Gatewood Road, NE BITNET: walt@EMORY Atlanta, GA 30329 USA Voice: +1 404 727 0648