SQL/MX Report Writer Guide
Introduction to the NonStop SQL/MX Report Writer
HP NonStop SQL/MX Report Writer Guide—527194-002
1-4
Report Development Steps
Report Development Steps
The steps for using the MXCI report writer to develop a report are described in detail in
the remainder of this guide. This summary provides an overview:
1. Setting report writer mode
Before developing a report, you must set report writer mode .
2. Selecting data
To produce a report, you must execute a SELECT command. In the SELECT
command:
•
Specify the data to be retrieved.
•
Specify the tables that contain the data.
•
Specify the criteria for selecting rows and joining rows from different tables and
views.
See the SQL/MX Query Guide and the SQL/MX Reference Manual for descriptions
of the SELECT command and its components. Before you specify the SELECT
command, you should plan the content and arrangement of information in the
report. To determine the SELECT requirements, you need to know only the basic
items of data that appear in each line. You can design the complete report with
titles, headings, and so forth, later. You should include report elements that require
data from the database so you know what to specify in the SELECT command.
3. Formatting a report
The simplest way to produce a report is to display or print the output of the
SELECT command using the report writer default format. See Default Report
Format on page 1-6 for a report created with the default report format.
To produce more elaborate reports, use report formatting commands to:
•
Specify the content of detail lines, titles, footings, and column headings.
•
Calculate subtotals of values in columns at specified break points.
•
A break point occurs when the value in a column changes; for example, when
the department number changes in a report with rows ordered by department
number.
•
Calculate the total value of a column over all rows in the report.
Note. All the examples in this guide assume that you have set report writer mode before
executing any report writer commands.
Note. Depending upon the criteria you include in a SELECT command, your query might
affect system performance or require a long time to complete. Before you issue a SELECT
command, you should consider preparing the SELECT command and generating an
explanation of the resources required to retrieve the data you need. See the SQL/MX
Reference Manual for information about the PREPARE command and EXPLAIN utility.