Re: Sometimes I just wonder, "WHY?!"
Posted in 1994
In article <dennisp.778186995@infmx> dennisp@informix.com (Dennis Pimple) writes: > >If you mean to print the same header, but need to initialize once, I suggest a >cleaner way is: > >PAGE HEADER >IF PAGENO = 1 THEN > # initialize first time in > LET ... >END IF >PRINT ... I have also used that method to initialize variables in reports. However, along came I4GL 4.10. Thus sayeth $INFORMIXDIR/release/TOOLREL_4.1: Advisory: PAGE HEADER PROCESSING IN REPORTS ------------------------------------------- Associated Bug: 3680 PAGE HEADER PRINTS PREVIOUS ROW'S VALUE WHEN PREVIOUS PAGE FILLED All 4.10 and older product report processing (I4GL, RDS, ACE) will defer execution of the PAGE HEADER block until the first SKIP, PRINT, or NEED statement on the ON EVERY ROW block unless a new page is triggered by SKIP TO TOP OF PAGE or NEED. This assures that the new row's values are available for printing in the PAGE HEADER block, after a group value changes. Note that this can affect reports that are coded to set user- defined program variables in PAGE HEADER and then use those variables to control behavior in ON EVERY ROW before any PRINT, SKIP or NEED. Therefore, a report should not specify behavior in the the ON EVERY ROW section that depends on values set in the PAGE HEADER section. Note the absence of a suggested work-around. :-( I still use the same method to initialize variables, but now I have to remember about PAGE HEADER behavior. An alternative might be to use global variables for running totals, etc., and initialize them outside of the REPORT module. Can anyone comment definitively on that idea? 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