Re: ORDER BY statement inside a REPORT
Posted in 1996
In article <53aakc$q60@venus.compulink.gr>, Panos <pvenizel@compulink.gr> writes >I have Informix 7.10 Online Server and Informix 6.04 4GL running on a >Unisys 6000-500/50 SMP server with two Pentiums. > >When I issue an ORDER BY inside a REPORT, because I want the rows to >be ordered inside the report, I experience the follwing problem. > >I have A FIRST PAGE HEADER statement with n rows, a PAGE HEADER >statement with m rows while pages are changed with SKIP TO TOP OF PAGE >statements. In the second page the internal LINENO does not calculate >correctly the line number after the PAGE HEADER rows, resulting to an >incorrect page change to the third page. This happens either with >explicit declaration of the page length in rows (66) or with changing >pages with ^L. > >Any help is appreciated. I can also send by e-mail a test .4gl for >this (bug in my opinion). > >Thanks >Panos > I'd do the order by outside of the report. You can not be sure when the sorting occurs. I've had to change several reports which assumed that if you send rows to a report then you get them in the order sent even if there is an order by in the report. I would order by outside the report and put an ORDER EXTERNAL BY in the report to tell it the rows are already sorted. -- David Williams