REPORT Control Blocks

The control blocks determine when INFORMIX-4GL takes an action in a report; within each control block, the statements determine what action INFORMIX-4GL takes. The list of statements within a control block terminates when another control block begins, or when the END REPORT keywords that terminate the REPORT program block are encountered. You can include most INFORMIX-4GL statements in a control block, as well as several statements that can be used only in the FORMAT section of a REPORT routine.

Standard 4GL Statements

The most common INFORMIX-4GL statements used in the control blocks of reports are CASE, FOR, IF, LET, and WHILE. These statements have the same syntax that they have elsewhere in 4GL applications. (Remember that any local variables referenced in such statements must be declared in the DEFINE section of the REPORT routine.)

Statements Valid Only in the FORMAT Section

The following five statements (sometimes called FORMAT statements) can appear only in control blocks in the FORMAT section of a REPORT routine:

Statement
Effect
NEED
forces a page break, unless some specified number of lines are available on the current page of the report.
PAUSE
allows the user to control scrolling of screen output.
PRINT
sends output to a destination (specified either in the OUTPUT section of the report, or in the OUTPUT TO REPORT statement).
SKIP
inserts blank lines into a report, or forces a page break.
References

NEED

PAUSE

PRINT

SKIP