Defining a reportΒΆ

Any number of !report sections may be defined within a single program, each defining a report or batch process. The program structure of a !report section is similar to that of other program code: declarations, labels, statements, comments, continuation lines and blank space are all used or treated in the same way. General commands, functions, system variables and declarations can also be used in report sections, and more of each are provided for use with reports only. See Related topics list below.

A report is defined as follows:

!report report_id {
declarations and statements

The command

run report report_id

is executed from the main program logic (outside the !report section) in order to execute the specified report. The output may be redirected to a file or to a window. If a report terminates with the command

control returns to the statement following the run report command. Thus several reports may be run, or the same report run more than once, without exiting from the controlling program.



Report declarations

Report functions

Report commands

Report system variables