SQL/MP Report Writer Guide

Introduction to the NonStop SQL/MP Report Writer
HP NonStop SQL/MP Report Writer Guide527213-001
1-4
Report Layout and Style
You can specify layout options, such as margins, the number of lines per page, line
spacing, and whether default headings are to print the above columns of data.
3. Customizing the style
Use the style options to customize subtotal labels, the style of date and time
formats, and special characters representing the underline and the decimal point.
4. Displaying and printing the report
To display or print all or part of the report, use the LIST command. Reports are
written to the OUT_REPORT file. If you want to see the report on your terminal,
you can use the default OUT_REPORT file (typically, your terminal). To print a
report, specify the name of a printer or a spooler as the OUT_REPORT file.
5. Saving the report definition
If you develop your report interactively, you can use the SAVE command to save in
an EDIT file the commands you used to define the report. Then each time you
want to print the report, use an OBEY command to execute the saved commands.
You can use a text editor to create the command file directly or to modify a saved
file.
Report Layout and Style
You specify the layout of a report by using the SET LAYOUT command and report
formatting commands. You specify the style of a report by using the SET STYLE
command.
Each layout and style option has a default value. The options apply to any report you
print while the option is set. A layout or style option stays in effect until you set it to
some other value, reset it to its default value, or end your SQLCI session.
For example, the default value for the PAGE_COUNT layout option is ALL; this option
prints the entire report. You can set a page count limit for the reports you are
producing. If you set a limit and do not want that limit applied to the next report you
print, you must reset the page count by entering either of the following commands at
the SQLCI prompt (>>):
>> RESET LAYOUT PAGE_COUNT;
>> SET LAYOUT PAGE_COUNT ALL;
To reset a style option, use the RESET STYLE command. (The prompts >>, +>, and
S> are described under Starting and Ending an SQLCI Session on page 2-1.
Report formatting commands relate to a specific SELECT command by referencing
database columns. For example, you can specify the format of a line that prints the
total of all values in a column, such as QTY_ORDERED. After you list all the retrieved
rows or cancel the SELECT command, the report formatting commands are canceled.
If you have saved the SELECT command and the report formatting commands in a file,
you can reexecute them. You can also use the HISTORY, FC, or exclamation point (!)
command to reexecute report commands executed earlier in the current session.