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

Customizing a Report
HP NonStop SQL/MP Report Writer Guide—527213-001
4-34
Formatting Data Values
If you want the dollar sign adjacent to the value, you can modify the original query by
adding a PF modifier and by revising the mask descriptor:
>> SELECT JOBCODE, AVG(SALARY)
+> FROM PERSNL.EMPLOYEE
+> GROUP BY JOBCODE;
S> DETAIL JOBCODE AS I4 HEADING "Job",
+> COL 2 AS "[PF'$'] M<Z,ZZZ,ZZZ.99>"
+> HEADING "Avg. Sal.";
S> LIST NEXT 5;
Job Avg. Sal.
---- -----------
100 $105,954.59
200 $24,000.00
250 $28,000.06
300 $31,123.05
400 $77,400.00
S>
Figure 4-16 interprets the display format specified for COL 2 in the previous query. The
form of
decoration is:
condition location char-string
The entire display format must be enclosed in quotation marks. The decoration must
be enclosed in square brackets.
Figure 4-16. Example of a Decoration
AS " [PF '$' ] F11.2"
char-string
to be inserted
location
F for immediately to
left of value
condition
P for postive
display-descriptor
fixed point, width 11,
2 digits to right of
decimal place
VST0416.vsd