A standard report has three basic parts:
The header or introduction of the report. This is often repeated as column headings at the top of each new page.
The body of the report. This may be repeated many times per page and contains the actual record data of the report.
The footer of the report, including summary, totals, subtotals, etc. This may be repeated at the bottom of every page or only at the end of the report.
The easiest and frequently the best way to create a report is to design these forms using THOR. These are then displayed using Reports.WrForm which functions similarly to a Display.DisplayBackground: whatever is in the memory record of the fields defined on the form is displayed on that form, the form is written (displayed) to the report file, and control immediately returns to the application without waiting for user input.
Several things should be noted when using forms for reports: Fields may be defined on these forms as on any other, although only Display Only fields make sense.
Various colors have no effect when printing a report unless the report is printed to the "CON" (console, the screen) file. If printed to the screen, the colors defined within the forms will be displayed.
The number of rows in the window for a form to be printed determines the number of lines to be printed. If the form window is 24 lines long, all 24 lines will be printed each time a form print request is made even though many of the bottom lines may be blank. The window should be shortened to include only the lines required.
The vertical position of the first line of the window on the screen has no bearing on the printed appearance of that form. Sage-ST TM ensures that the form is properly positioned on each report page. Helpful Hint: Initially create the header, the body template, and the footer on a single form. Align columns, position titles, etc. on this form until it is just as you want it. Now copy this form to three places: your actual header, body, and footer forms. Window each form such that the extraneous portions are excluded.
Each report form line represents an 80-character line. If a window form is used whose width is less than 80 characters, the effect in the report is that all character positions to the right and left of the window are blank-filled. The same results can be obtained by making the form 80 characters wide and using blanks within the form.
A report of greater than 80 columns per line may be defined using forms even though forms are limited to an 80 column screen. This is done by using the first line of the report form(s) to define the number of form lines to combine for each report line. The first column of the first line should contain the ASCII.soh ('smiley face') (formed by pressing <Alt/1> using the '1' from the number pad) followed by a number representing the number of form lines per report line. The remaining lines of the report form are then grouped by the report process by this supplied number. For example, a form to be used for a 2 line portion of a report requiring between 81 and 160 characters per line may look like the following:
line 1 - (Alt/1)2
line 2 - The first half of the first report line
line 3 - The second half of the first report line
line 4 - The first half of the second report line
line 5 - The second half of the second report line
SUBTOPICS
Console Reports Go Back To Sage-ST TABLE OF CONTENTS
warren.merrill@inl.gov
,
ftp://sage.inel.gov
Copyright © 1989-2006. Battelle Energy Alliance