Re: "last page trailer" in reports?
Posted in 1995
Remember that in later versions of Informix (we use 4.10 tools, 5.00 engine) none of the 'ON LAST ROW' stuff is executed if no rows are found. We use the following type of stratagy in 4GL programs: MAIN ... LET rowsfound = FALSE FOREACH cursor-name OUTPUT TO REPORT myreport VALUES( 0, .... ) LET rowsfound = TRUE END FOREACH IF rowsfound = FALSE OUTPUT TO REPORT myreport VALUES( 100, ... ) END IF END MAIN REPORT( p_status, ... ) DEFINE p_status INTEGER, ... FORMAT .... ON LAST ROW IF p_status = 0 THEN PRINT 'end of report' ELSE PRINT header PRINT 'No rows found' END IF END REPORT -- ============================================================================ Sally Woolrich | This mail contains my personal sally@excelsis.demon.co.uk | views not those of my employer! ============================================================================