Re: help with 4gl reports
Posted in 1997
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
In article <01bc81e2$49485380$6b6185ce@bradleyhanson>, "molly" <bradleyhanson@sprintmail.com> wrote: > > I know the answer to this problem is probably very simple, but I can't seem > to find it and I'm desperate... I would greatly appreciate any advice. > I'm receiving an unwanted extra line at the end of a report. I've set the > top and bottom margins to 0 and the page length to two (there's a first > page header). > The program generates four seperate reports, all formatted the same way, > and two of them are fine. > > thanks An informix report will always generate PAGE LENGTH number of lines, regardless of if they are being used or not. From my own experience, when the application required line-by-line control of the output, I use PAGE LENGTH 1, and then as a part of my ON EVERY ROW, do a check against PAGENO if I need a "header". See the enclosed example, hopefully this addresses what you were asking... {----------------------------BEGIN FILE------------------------------} MAIN START REPORT testit TO "testit.out" OUTPUT TO REPORT testit("stuff1") OUTPUT TO REPORT testit("stuff2") OUTPUT TO REPORT testit("stuff3") OUTPUT TO REPORT testit("stuff4") OUTPUT TO REPORT testit("stuff5") OUTPUT TO REPORT testit("stuff6") OUTPUT TO REPORT testit("stuff7") OUTPUT TO REPORT testit("stuff8") FINISH REPORT testit END MAIN REPORT testit(stuff_val) DEFINE stuff_Val char(10) OUTPUT TOP MARGIN 0 BOTTOM MARGIN 0 PAGE LENGTH 1 FORMAT ON EVERY ROW #Notice that you must use and if/else to keep the count of potential lines #printed = 1 IF PAGENO = 1 THEN PRINT "page head" ELSE PRINT "stuff val: ", stuff_Val END IF END REPORT -------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to Usenet