HPlogo QUERY/V Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 2 USING QUERY/V

REPORTING DATA

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

The reporting commands, LIST and REPORT, display selected information from the data base(s). QUERY provides several reporting techniques which enable you to examine the data in the data base without writing a program. You can report information in three ways:

  • Use one command to retrieve data entries for a single report with automatic formatting.

  • Use two commands, one to retrieve data entries which can be used repeatedly and another to produce a report with automatic formatting.

  • Use two commands, one to retrieve data entries which can be used repeatedly and another to produce a report with your formatting specifications.

The LIST command combines the functions of locating and reporting. You can selectively locate entries and print them in a report with automatic formatting and headings. Data in the formatted report is printed in columns.

REPORT ALL is a form of the REPORT command. REPORT ALL is similar to the LIST command in that it automatically formats your report. However, REPORT ALL reports data entries selected by the last retrieval command. The formatted report prints one data item name and value per line for all data items in each retrieved entry.

The REPORT command also reports data entries selected by the last retrieval command. However, the REPORT command allows you to design your own report format. Your report can include:

  • From 1 to 9 lines of heading information such as a title, column headings, page numbers, date and time of day. This information can be repeated at the top of each report page. You can specify blank lines to be interspersed in the heading as long as the heading does not exceed one page.

  • Sorted data entries with group and total information printed with entries belonging to the same group. You can accumulate totals, compute averages, and count entries automatically, or you can use the thirty QUERY registers to do computations on numeric data item values and report the results.

  • Edited data item values with inserted dollar signs, minus signs, decimal points, and other ASCII characters.

  • Statements which change the output device to the QSLIST device, define the number of lines per page, request a pause after each page (in session mode), and suppress the margins which usually appear at the top and bottom of a page. (For example, information on a line printer can be printed across the perforation.)

The REPORT command can be stored as a procedure in a Proc-file for repeated use without re-entering the command. Reporting procedures can be created which prompt you for desired information when the procedure is executed. This allows you to use different specifications for the report each time the procedure is executed.

You can also write your own user-defined procedures in a programming language which enable your report to perform specialized functions not provided by QUERY. This feature is intended for use by programmers. Refer to Appendix F for further discussion.

Feedback to webmaster