How to: |
Reference: |
The SET command, SET EMPTYREPORT, enables you to control the output generated when a TABLE request retrieves zero records.
The EMPTYREPORT=ANSI setting introduces ANSI-compliant handling of reports with zero records, producing a one-line report containing only the specified missing data character. If the request is a COUNT operation, however, a zero is displayed for the missing values.
Use this command:
SET EMPTYREPORT = {ANSI|ON|OFF}
Valid values are:
Produces a single-line report and displays the missing data character or a zero if a COUNT is requested. in each case, &RECORDS will be 0, and &LINES will be 1.
If the SQL Translator is invoked, ANSI automatically replaces OFF as the default setting for EMPTYREPORT.
Generates an empty report when zero records are found.
Does not generate a report when zero records are found. OFF is the default setting.
The command may also be issued from a request. For example:
ON TABLE SET EMPTYREPORT ON
following request does not retrieve any records and sets the EMPTYREPORT parameter to OFF.
SET EMPTYREPORT=OFF TABLE FILE WFLITE HEADING "This is the heading" SUM COGS_US REVENUE_US COLUMN-TOTAL ROW-TOTAL BY COUNTRY_NAME WHERE COUNTRY_NAME EQ 'Louisiana' FOOTING "This is the footing" ON TABLE SET STYLE * GRID=OFF,$ END
The following output is produced.
0 NUMBER OF RECORDS IN TABLE= 0 LINES= 0
Changing the EMPTYREPORT setting to ON produces the output shown in the following image.
Changing the EMPTYREPORT setting to ANSI produces the output shown in the following image.
|
Information Builders |