How You Obtain Data for a Report
Depending on the intended use of the report, obtain the data for your report in one of three ways:
• Specify a report directly from an existing table (or view) with the .data statement.
• Specify a query to retrieve a specific subset of the data in the tables each time the report is run.
• Create one or more temporary tables based on one or more existing tables.
If you obtain data for your report with the .data statement, Report-Writer reads all rows and columns in the table each time you run the report.
You can limit the data for the report by specifying conditions in a where clause in the query. You can also specify a query that contains variables (generally in the query's where clause) to be specified each time the report is run.
Another way you can obtain data for the report is to create a temporary table by specifying a series of query language statements in a .setup section. Create this section with the optional .setup statement in conjunction with the required .data or .query statement in your report. The .setup section can also be customized at runtime, using variables.
Last modified date: 08/14/2024