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-11
Entering Report Formatting Commands
There can be only one version of each of the following commands in effect at one time:
•
BREAK ON
•
DETAIL
•
PAGE FOOTING
•
PAGE TITLE
•
REPORT FOOTING
•
REPORT TITLE
•
TOTAL
If you enter a second version of any of these commands, that version replaces the
previous one. A report formatting command is canceled if you do any of the following:
•
Cancel the current SELECT command
•
Enter LIST ALL
•
Reset the command using RESET REPORT
You can have more than one BREAK FOOTING, BREAK TITLE, or SUBTOTAL
command in effect at a time, but only one of each type of command can refer to a
specific break column defined in the BREAK ON command.
For example, suppose you enter the following BREAK ON command:
S> BREAK ON DEPTNUM, JOBCODE;
You can request a subtotal of the first column for every department number as follows:
S> SUBTOTAL COL 1 OVER DEPTNUM;
Column 1 will be subtotaled whenever the value of DEPTNUM changes.
To request a subtotal of the second column whenever the job code changes, enter the
following:
S> SUBTOTAL COL 2 OVER JOBCODE;
If you enter another SUBTOTAL OVER command for the same break item, the
previous SUBTOTAL OVER command for that item is replaced.
For example, the following SUBTOTAL command replaces the previous SUBTOTAL
OVER JOBCODE command:
S> SUBTOTAL COL 3 OVER JOBCODE;
If you enter a SUBTOTAL command without an OVER clause, the items specified will
be subtotaled whenever the value of any break item changes. This command provides
a short way of specifying SUBTOTAL OVER for all break items.
You can have only one version of a SUBTOTAL command without an OVER clause
current at one time. In the following example, the SUBTOTAL COL 1 command