SQL/MP Report Writer Guide
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Introduction to the NonStop SQL/MP Report Writer
- 2 Using SQLCI and the Report Writer
- 3 Selecting Data for a Report
- 4 Customizing a Report- Defining the Layout
- Specifying the Items in a Detail Line
- Naming Select List and Detail Line Items
- Organizing Rows Into Break Groups
- Labeling Information
- Formatting Data Values
- Formatting Dates and Times
- Using TACL to Pass Parameters
- Conditional Printing of Items or Line Entries
- Redefining Special Characters
- Calculating Totals
- Calculating Subtotals
- Printing Double-Byte Characters
 
- A Comparison of the Report Writer and the Enform Language
- Index

Introduction to the NonStop SQL/MP Report Writer
HP NonStop SQL/MP Report Writer Guide—527213-001
1-3
Report Development Steps
options, layout options, or report formatting commands. However, if you want to design 
your own report, you can revise the default format by entering report formatting 
commands or by using the SET LAYOUT or SET STYLE commands to change the 
default values of layout or style options. 
Using the report writer features, the SELECT command, and the LIST command, you 
can develop a report in stages and view each change as you make it. 
When you are satisfied with the format and content of your report, you can either enter 
the LIST ALL command to produce the report, or enter the SAVE command to save the 
final version of the options, formatting commands, and SELECT command in a file. To 
print the report that you have defined and saved, use the OBEY command as 
described in Defining Reports in Command Files on page 2-15.
Report Development Steps
The steps for using the SQLCI report writer to develop a report are described in detail 
in the remainder of the manual. The following summary provides an overview of the 
steps:
1. Selecting data 
To produce a report, you must execute a SELECT command. In the SELECT 
command, you specify the data to be retrieved, the tables that contain the data, 
and the criteria for selecting rows and joining rows from different tables and views. 
See the SQL/MP Query Guide and the SQL/MP 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 any report elements that 
require data from the database so you know what to specify in the SELECT 
command.
2. Formatting the 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. To produce more 
elaborate reports, use report formatting commands to specify the content of detail 
lines, titles, footings, and column headings. Report formatting commands can also 
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. In addition 
to subtotals at break points, you can calculate the total value of a column over all 
rows in the report. To change the appearance of the report, use the layout options. 
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/MP 
Reference Manual for information about the PREPARE command and EXPLAIN utility.










