5: Creating the Demonstration System Reports

5.3.1 Entering a Report Description

To enter a new Report Description, press the ADD key <F6>. This places the screen in ADD mode.

The default values for the report attributes Page Length, Page Width, First Line, and Last Line are displayed in their appropriate entry fields, and the cursor is on the Data File Name field, which is the first entry field. The remainder of this section describes each of the fields of the Report Description screen and how they affect the printed report, as well as the entries which must be made in our example.

Each report designed with the Report Generator reports on data from a single C/Base RMSfile. This file is named in the Data File Name field. The Report Generator then checks to see that this is a valid RMSfile name and opens the RMS dictionary file for processing. The name of the RMSfile can be specified as either an absolute pathname, a relative pathname, or a logical name. Since using the logical name increases portability and generality, we recommend that you always use a logical name.

You can sort the records in the RMSfile to control the order they will appear in the report. This is done by specifying from one to three data field names in the Sorted By entry fields. All the records are sorted by the first Sorted By field. If you specify a second Sorted By field and there are records whose first sort fields are equal, they are sorted by the second sort field. Similarly, if you specify a third Sorted By field and there are records whose first and second sort fields are equal, they are sorted by the third sort field. If the Sorted By fields are left blank, the data records are not sorted. If the records are not sorted, or if they are sorted but all their sort fields are equal, then they are reported in the order that they appear in the RMSfile.

The three columns of fields labeled Field Name, Condition, and Value indicate the record selection criteria. You can use record selection to produce a report containing only the data records which meet these criteria. Examples of this feature might be a report of active customers or customers who are due for service.

The first of these fields, Field Name, names a data field in the RMSfile.

The second field, Condition, indicates the type of comparison to be made between the value of the data field specified in the Field Name field and the value in the Value field. The Condition can be any one of the following:

The third and final field, Value, assigns a test value to compare with the value of the actual data field. Values can be the name of another field in the report RMSfile, an environment string name preceded by a dollar sign ($), a number, or a string ‘delimited’ by the double-quote character (“string”).

Leaving the selection criteria blank causes all of the records in the RMSfile to be included in the report.

The default values of the print attributes are set for printing on standard letter-size

(8 1/2"x11") paper with a line spacing of 6 lines per inch. If you want to print your report on a non-standard paper size, these values must be changed.

The value of the Page Length field controls how many print lines there are on each page, including the blank lines that are skipped as margins at the top and bottom of the page.

The value of the Page Width field controls the maximum number of print columns the report can use across one print line. (Note: 1 print column = 1 character.)

The value of the First Line field sets the top margin for the page. At the top of a new page a number of blank lines are ‘printed’ to advance the printer to the line where the report is actually to begin printing. The number of blank lines ‘printed’ at the beginning of each page is one less than the value specified in the First Line field.

When the line number indicated by the Last Line field is printed, the page footing is printed and the paper is advanced to the top of the next page. This means that there must be enough lines left at the bottom of the page to print the footing. Therefore, the value assigned to the Last Line field plus the total number of footing lines must be less than or equal to the value assigned to the Page Length field. (Note: Page footings are explained in subsequent sections of this chapter.)

The only input required for our ‘simple’ report is the name of the report’s RMSfile, mag. After making this entry and pressing the STORE key <F5>, the screen is cleared and the Report Section screen is displayed.