2 Report Description Statements

The REPORT EXIT Statement

The REPORT EXIT statement defines what action is to be taken when a report is prematurely stopped. It is triggered by the execution of a STOP REPORT statement in the local program. After the REPORT EXIT section is completed, blank lines are printed to ensure that a complete page is ejected.

REPORT EXIT (exec flag) [WITH number LINES]

[USING [;list]][block statements]

The parameters are:

exec flag
An integer expression which is evaluated after the STOP REPORT is executed. If it evaluates to zero, the REPORT EXIT will not be executed. If it evaluates to any non-zero value, the REPORT EXIT will be performed.
number
The number of lines required for the exit routine. If not entered, the value of number defaults to 1. If the routine requires more than one line, it is important that this parameter be used to ensure correct page alignment.
line id
A line number or label referencing an IMAGE statement.
image string
A list of image specifiers describing the output format and enclosed in quotes.
list
This may be a list of string, numeric or array variables, literals, constants or expressions to be printed according to the image referenced.
block statements
Statements may follow the REPORT EXIT statement. They will be evaluated and executed immediately after the REPORT EXIT statement.
An example of this statement follows:

100    REPORT EXIT (NUMLINES(0)>0) WITH 2 LINES USING"/
,20X,K" " *** USER TERMINATED REPORT ***"
110    END REPORT DESCRIPTION
.
.
.
200    KEY #8 "EXIT REPORT" GOTO Rexit
.
.
.
300 Rexit:  OFF KEY #8
310         STOP REPORT
320         GOTO Eoj

Eloquence Report Manual - 19 DEC 2002