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:
Press the Space Bar 16 times
Type S u b s c r i b e r (with a space between each letter)
Press the Space Bar 3 times
Type L i s t (with a space between each letter)
Press the Space Bar 11 times
Add a field to print $todays_date with a Field Length entry of 8
Move the cursor to the blank column immediately after the field just added and press the Space Bar 5 times
Press the Space Bar once
Add a field to print $page with a Field Length entry of 1
Press <RETURN> twice
Press the Space Bar 6 times
Press the Space Bar 20 times
Press <RETURN> once
Press the Up Arrow key 4 times or the Home key once
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 reports 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:
Field Name - Field Length
subscriber - 15
name - 23
address - 35
city - 20
state - 2
zip - 5
Since the subscriber, name, and address 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:
Field - Line# - Starting Column
subscriber - 2 - 1
name - 2 - 17
address - 2 - 41
city - 3 - 41
state - 3 - 63
zip - 3 - 67
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.