(Contents)(Previous)(Next)

REPORT Formatting

The REPORT generator is called with the keyword REPORT. After the keyword CMD, the REPORT statements described in the manual ADABAS QUERY can be specified. The keyword CMD can be omitted in REPORT statements, if no result table is specified.

The individual REPORT statements can be written without separators in consecutive rows. If there are several statements in the same row, they must be separated from each other by ';'. A complete description of the available REPORT statements is contained in the manual ADABAS QUERY.

Variables with a ':' prefix can be used in REPORT statements, as in SQL statements. They are replaced by their current values before the REPORT call.

As a rule, a REPORT call refers to the result table that was generated last. A result table is implicitly generated with the SELECT statement, with the exception of single row accesses (options DIRECT, FIRST, NEXT, PREV, and LAST).

Result tables can be named explicitly. After REPORT, the name of the result table is specified to which the following formatting refers. Instead of the constant name, an arbitrary expression can be used. To be able to distinguish this expression from the name of a constant, it must be prefixed by a colon (:).

Examples:

If nothing else has been requested, SQL-PL displays the first section of the prepared report on the screen. With the scrolling functions of REPORT, any section can be displayed on the screen.

With the following REPORT statements, the report can also be output on the printer or into a file:

The representation of NULL values in the report can be set with the NULL statement of REPORT and, specifically for the user, via the SET function of the SQL-PL workbench.

After leaving the REPORT, $ROWNO and $COLNO can be used to request the position of the cursor. Errors occurring in REPORT can be requested by using $RC and $RT.

Syntax:


(Contents)(Previous)(Next)