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-44
Using TACL to Pass Parameters
You can use the JULIANTIMESTAMP function with a TIMESTAMP column named
NEXT_MEETING:
JULIANTIMESTAMP (NEXT_MEETING) AS DATE "MA DB2, Y4"
To get the day of the week printed as a word such as Sunday, you can use the
following print item:
JULIANTIMESTAMP (CURRENT) AS DATE "DA"
For a TIMESTAMP column named XX, you can use the following print item:
JULIANTIMESTAMP (XX) AS DATE "DA"
If your database contains Julian timestamps in a column, but you want to print them in
European format, you can use the CONVERTTIMESTAMP function. For example,
assume DATE_TIME is a Julian timestamp:
DATEFORMAT (CONVERTTIMESTAMP (DATE_TIME), EUROPEAN)
Formats for Dates Stored as Binary Values
If the date is stored as a binary value but not as a timestamp, you can use a mask to
enhance the display. For example, the DELIV_DATE column is defined as data type
NUMERIC(6) and contains values such as 870618 representing YYMMDD. If you want
to print the date with the units separated by slashes, you can use the following mask in
the print item:
DELIV_DATE AS M<03/03/03>
The printed result is 03/07/18.
Using TACL to Pass Parameters
If you want to pass a parameter value to a report formatting command, you can write a
TACL macro and pass the parameter to the macro when you run it. The parameter is
inserted into the report formatting command before it is sent to SQLCI. Figure 4-17
on
page 4-45 illustrates this technique.