For Harold Trammel - nested cursors
Posted in 1993
Can't reach you directly. > Options that I see: > - send each report to a separate outfile and join them with a > Unix call after the report is finished > > - give up on the grouping and simply call the sign data from within > the animal report. > > Any suggestions will be appreciated. I've tried a lot of different > approaches with very limited success. > I've tried two different things in ace and 4gl. In Ace (were we needed to put 14 tables together) I ran about 7 different reports and tacked on a sort key to the beginning of each line. After the report had been run the shell which invoked it merged/sorted all of the files | cut of the sort field. This worked pretty well - although it was awfully kludgey. In 4gl I have a report which uses about 12 different tables (6 cursors) - each with their own formatting for a single report. In this I use a series of nested loops to actually pull the data. I then set a report_control switch and pass that along with the data, to the report section. The report section uses that switch to determine which detail line to print. The report itself looks a bit like a jury-rig - but once you get used to it it makes a lot of sense. If you like I'll ask if I can e-mail you a copy. j. _____________________________________________________________________________ Jack Parker - Contractor | Hewlett Packard, BSMC Boise, Idaho, USA| If you keep staring at it like that, jparker@hpbs2561.boi.hp.com | your nose is going to grow (208) 323-5388 (W) (208) 384-1623 (H) | into the bark. ^^^ 396 as of 6:30am April 29th _____________________________________________________________________________