October 24, 2007, 09:44 AM
cburttAfter the TABLE FILE ... END producing the report, use D/M to test the number of records put into the preceding report (&RECORDS). If there are records, EXIT the FocExec. If there are no records, do either of two things:
1) Use D/M HTMLFORM command to include a pre-prepared web-page that displays on the 'empty report' condition (-HTMLFORM norecs).
2) Query a file that always exists and print a report that is nothing but a heading which explains the no-report condition:
TABLE FILE CAR
DEFINE FILE CAR
BLANK/A1 = ' ';
END
PRINT BLANK
HEADING
"No report to print"
WHERE READLIMIT LE 1
END
October 24, 2007, 02:20 PM
ktnjThank you.
I think I'll use option 2.
Problem solved.
October 25, 2007, 11:20 AM
ihffirst request......... and then
-IF &RECORDS EQ 0 GOTO SPCL ELSE GOTO XIT;
-SPCL
DEFINE FILE CAR
BLNK/A1 WITH COUNTRY = ' ';
END
TABLE FILE CAR
PRINT BLNK AS 'THIS REPORT IS BLANK BECAUSE NO RECORDS WERE FOUND'
WHERE RECORDLIMIT EQ 1
ON TABLE SET EMPTYREPORT ON
END
ira aix 533 WF 5.3.6