5: Creating the Demonstration System Reports

5.3 Creating a New Report

The first report we will create is very simple. It is a listing of each magazine’s code, title, annual subscription rate, and number of subscribers. To begin, select choice D1 - Create Report Program from the Report Generator Menu. You are presented with a parameter form asking you for the logical name of the report to be created and whether you wish to create a text report. Enter mymag as the logical name of the report. The actual report is created in the rpt directory in the home directory of your database. Text reports are beyond the scope of this tutorial so answer no to this question.

Press the STORE key <F5>.

You enter report attributes on this screen in much the same way as you enter into a C/Base data entry form. In the Report Generator, however, some of the function keys are used slightly differently. Their functions are as follows:

The GOLD key <F1> serves the same purpose as the function, or gold key on a calculator. The GOLD key <F1> followed by another key gives the second key a new function. For example, when you press the D key, the normal action is entry of the letter D into the current field at the location of the cursor. However, if you press the GOLD key <F1> and then the D key, the new action is that of the DELETE function.

The extra GOLD functions that are active with the Report Description screen are very similar to their counterparts used in the C/Base data entry forms. They are:

Pressing the GOLD key <F1> and then the H key gives you access to the on-line help facility for the Report Generator.

Pressing the GOLD key <F1> and then the X key allows you to cancel the current function (e.g., UPDATE or ADD). Using the CANCEL function while in UPDATE mode restores the original contents of the Report Description screen. Using the CANCEL function while in ADD mode clears all of the screen fields. After using the CANCEL function, the screen is returned to a no-mode state.

Pressing the GOLD key <F1> and then the D key deletes the contents of the currently displayed Report Description screen.

Pressing the GOLD key <F1> and then the R key ‘refreshes’, or ‘re-paints’, the screen. This is useful should extraneous characters be displayed on the screen.

While in ADD or UPDATE mode, pressing the GOLD key <F1> and then the 4 key clears all of the screen fields.

As noted, the function keys <F2> and <F3> are not used by the Report Generator on this screen.

If a Report Description has already been stored, it may be changed by pressing the UPDATE key <F4>. This moves the cursor to the first entry field and allows changes to be made.

Pressing the UPDATE key <F4> when the UPDATE function is currently active restores the contents of each field of the Report Description screen to their original values ant the form remains in UPDATE mode.

After all of the changes are made, press the STORE key <F5> to record the changes.

Pressing the ADD key <F6> allows you to enter information to a new Report Description screen. When the add function is invoked, the cursor moves to the first entry field on the form and you can enter the new description. The entry fields at the bottom of the screen are filled with values. These are the default values for the report attributes and may be changed, provided that the values entered are valid entries for those fields.

After you have entered the new Report Description, press the STORE key <F5> to record it.

The SWITCH key <F7> displays the first Report Section of the report. (Note: This function only works when a Report Description has been stored.) Pressing the SWITCH key <F7> a second time re-displays the Report Description screen.

Although you won’t use the EXIT function until you are finished designing the report, pressing the EXIT key <F8> saves the report file returns you to the Report Generator Menu.