The part of a program that generates the rows of report data (also known as input
records) is called the report driver. The primary concern of the row-producing logic is the
selection of rows of data.
The actions of a report driver are:
- Use the START REPORT statement to initialize each report to be produced. We
recommend that clauses regarding page setup and report destination be included in
this statement.
- Use a forward-only database cursor to read rows from a database, if that is the source of the
report data.
- Whenever a row of report data is available, use OUTPUT TO REPORT to send it to
the report definition.
- If an error is detected, use TERMINATE REPORT to stop the report process.
- When the last row has been sent, use FINISH REPORT to end the report.
From the standpoint of the row-producing side, these are the only statements required to create a report.