Re: Nested Reports in I-4GL
Posted in 1993
Harold, Interesting all us Veterinary database folks have similar problems. Here's a brief explanation of how we handle similar reports... If you would like a concrete example, I would be happy to mail you a copy of one of our reports, let me know. start report report_name foreach whatever into whatever.* call Client_Data (whatever.*) call Animal_Data (whatever.*) call Diagnoses_Data (whatever.*) call Operation_Data (whatever.*) end foreach finish report report_name Each of the functions we call has its own output to report calls and passes in its own set of data (along with empty data structures for the stuff it won't be printing during this particular call). At the beginning of each function a flag is set (eg. function_type = "C") which is unique for that function and is passed into the report. Then all you need in the format report section is if-then-else or case logic to decide what to print. I personally find this is easier than creating lots of little reports and catting them together. Hope this makes sense and that it is useful! Cathy +-------------------------------+----------------------------------------+ | Cathy Kipp | Internet: ckipp@vth1.vth.colostate.edu | | Veterinary Teaching Hospital | | | Colorado State University | Voice: (303) 491-1294 | | Fort Collins, CO 80523 | Fax: (303) 491-1205 | +-------------------------------+----------------------------------------+