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

Using SQLCI and the Report Writer
HP NonStop SQL/MP Report Writer Guide—527213-001
2-19
Defining Reports in Command Files
Creating an Command File With a Text Editor
You can use a text editor to create a command file that contains all of the commands
needed to define a report. The SELECT command must precede the report formatting
commands. To prevent any SELECT output from printing or displaying before the
report formatting commands execute, enter the following command before the
SELECT command:
>> SET LIST_COUNT 0;
You can use the editor not only to create a report definition, but also to modify a file
you create with the SAVE command. For example, if you decide you are going to run a
report repeatedly, you might want to add more commands to the file.
For more information about providing data selection criteria when you execute a
command file, see Using Parameters With SELECT Commands on page 3-23.
Figure 2-10. Modifying OBEY Commands
S> BREAK TITLE O.ORDERNUM (SKIP 1, "CUSTOMER ", CUSTNUM,
R"Cust. No.", CUSTNUM,
.
.
>> OBEY ORDFILE;
>> SET SESSION AUTOWORK ON;
Commands are
displayed as they
execute.
+> UNIT_PRICE
*QTY_ORDERED HEADING "TOTAL PRICE";
>> SELECT O.ORDERNUM, ORDER_DATE, CUSTNUM,
.
.
Revise title.
S> FC BREAK TITLE
.
.
.
.
Press Return
S> BREAK TITLE O.ORDERNUM (SKIP 1, "Cust. No. ", CUSTNUM,
Press Return
+> TAB 30, "Order Date ", ORDER_DATE, SKIP 1)
;
.
.
+> TAB 30, "Order Date ", ORDER_DATE, SKIP 1)
;
Change Margin
Save Commands
S> TITLE "Order Summary";
S> SET LAYOUT RIGHT_MARGIN 60;
S> SAVE LIST_COUNT TO ORDFILE CLEAR;
S> SAVE LAYOUT * TO ORDFILE;
S> SAVE STYLE * TO ORDFILE;
S> SAVE REPORT * TO ORDFILE;
Add title
VST0210.vsd