On Thu, 29 Aug 2002 08:35:27 -0700, Dan Goldberg wrote: >PRINT reportname where limit = 0
Dan, Copy the report, calling the new report "ReportNameEmpty" or something like that. Delete all the columns and variables and other things you don't need from the copy, but put fixed text in the details that says "No transactions to report." or something like that. Change the report table of the new report to a table that always has at least one row. Many of us have a one-row, one-column table named "dummy" table for uses like this. Then you can use one of these two approaches: ======================== -- one way to report that there is nothing to report SET VAR vNumRows INT = 0 SELECT COUNT (*) INTO vNumRows + FROM reportTableorView + WHERE (same WHERE as with the PRINT statement) IF vNumRows = 0 THEN PRINT dummyreport WHERE limit = 1 ELSE PRINT reportname WHERE realwhereclause ENDIF =================== -- second method PRINT reportname WHERE realwhereclause IF SQLCODE = 100 THEN PRINT dummyreport WHERE limit = 1 ENDIF Bill ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: INTRO rbase-l ================================================ TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: UNSUBSCRIBE rbase-l ================================================ TO SEARCH ARCHIVES: http://www.mail-archive.com/rbase-l%40sonetmail.com/
