Controlling the Display of Empty Reports

How to:

If a report request returns no records (for example, because no records satisfy its selection criteria, or because the data source has no records), you can choose to display or print:

This applies to tabular reports, not to free-form reports and graphs.

EMPTYREPORT is not supported with TABLEF. When a TABLEF request retrieves no records, it always generates an empty report.

SET EMPTYREPORT = OFF is not supported with DOC format.

If you have created a report that contains a WHERE TOTAL statement and the test yields zero records, an empty report will display.


Top of page

x
Syntax: How to Control the Display of an Empty Report

You can control what is displayed (or printed) when a report request returns no records, using the EMPTYREPORT parameter. To issue the SET command:

Outside of a report request, use the syntax

SET EMPTYREPORT = {ANSI|ON|OFF}

Within a report request, use the syntax

ON TABLE SET EMPTYREPORT {ANSI|ON|OFF}

where:

ANSI

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.

ON

Specifies that the report will be displayed without data but with column titles, a report heading (if one was specified in the report request), and a page heading (if one was specified).

OFF

Specifies that a message will be displayed indicating that there is no report output. OFF is the default value.


WebFOCUS