5: Creating the Demonstration System Reports

5.10 Spacing of Report Sections

When a Report Section is ‘printed’, all lines from the top line of the section to the last non-blank line are printed. Thus it is impossible to have a blank line as the last line of a Report Section. This can create quite a problem when you have more than one multi-line Detail section on a single page since the Detail section of one record is followed immediately by the Detail section of the next record, thereby causing a report which may be very simple in terms of the data it is reporting to become very confusing in appearance. The technique to avoid this potential confusion is to leave the top line of the Detail section blank. This blank line then precedes the rest of the lines of the Detail section, separating each Detail section from the next by a blank line. In the following example we will illustrate how to control the spacing of the various sections of a report by recreating the report which is run when choice 3 - List Subscribers is selected from the Demonstration Subscription System menu.

To create this report, select the appropriate choice (i.e., D1 - Create Report Program) from the Report Generator Menu and perform the steps indicated in the instructions that follow. We will name this report program sub. (Note: It is assumed that no report file by this name already exists.)

After storing the contents of the Report Description screen, the Report Section screen is displayed. The Page Heading section should then be filled in as follows:

Now that we have entered the necessary information in the Page Heading section, we can move on to the Detail section.

Pressing the NEXT key <F3> twice at this point displays the Detail section. This is the section which should contain the subscriber information. For each of the print fields to be added, only the Field Name and Field Length values must be specified, since all of the fields are located in the report’s RMSfile. In our example, however, shorter (i.e., non-default) Field Length values should be specified for the name, city, state, and zip fields. The following table lists the names of the fields which are to be included in this report, as well as the Field Length which should be assigned to each of them:

Since the subscriber, name, and address[1] fields are all printed on the same line (line number 2), and the city, state, and zip fields are likewise be printed together on one line (line number 3), spaces should be inserted to format the output accordingly. In this example, we will place a single space between the print fields of line 2 and two spaces between the print fields of line 3. The following table lists the position (i.e., the line number and starting column) of each print field to be included in the Detail section:

Notice that Line # 1 is left blank . That is the method used to control the spacing of the various sections of a report which was mentioned earlier.

At this point, you may select the PICTURE function (by pressing the GOLD key <F1> followed by the P key) to make sure things are ‘lined up’ as they should be.

After pressing any key, pressing the EXIT key <F8> saves the reportfile and returns to the Report Generator Menu.