Use FORM.FINAL to make detailed choices about the content and placement of final text in a report. QMF places the text at the end of the report, and you can use it, for example, to identify the final summary data of a report.
Area H on FORM.MAIN specifies the final text for a report. Whatever you specify in this area of FORM.MAIN is reflected on FORM.FINAL. Similarly, the first line of final text is reflected on FORM.MAIN.
The following figure shows the entry fields on the FORM.FINAL panel.
- A New page for final text?
- Specify whether to place the final text on a page separate from the body in a printed report. A new page is started if the report is not already at the top of the page.
- B Put final summary at line
- Specify whether to generate the final summary of a report and,
if so, where to place it in relation to the final text. The value
for this entry can be any number from 1 through 999 or the word NONE.
The number is the number of the line of final text next to which you
want to place the final summary. NONE (or N) omits the final summary.
If you expect the final summary value of a wrapped column to be greater than one line long, include final text on the line corresponding to the last line you expect for your wrapped final summary value. Including final text is only necessary if the wrapped column has a usage code of MAX, MIN, FIRST, or LAST.
For example, if the column NAME (from Q.STAFF) is set to a width of 2, has an edit code of CW, and a usage code of MAX, you must place some final text (perhaps a period) on the fifth line of FORM.FINAL to see the entire final summary value for that column (YAMAGUCHI).
Two data lines per summary in an across report can appear only if the across summary column and final summary are both present. This occurs when a column in the form has a usage of CSUM, CPCT, PCT, TPCT, or TCPCT.
When the across summary column is omitted on FORM.OPTIONS, the ACROSS-across values are also omitted and only one line is formatted per group (with ACROSS-down values).
When the final summary is omitted on FORM.FINAL, the ACROSS-down values are omitted and only one line is formatted per group (with the ACROSS-across values).
- When there are two summary lines, but only one is charted by the
Interactive Chart Utility (ICU), the second summary data line contains
values only in columns for which PCT, CPCT, or CSUM is specified.
In these columns:
- The value in the first line is the summary value for that category relative to the ACROSS-across (group) total.
- The value in the second line is the summary value for that category relative to the ACROSS-down (category) total.
- C Blank lines before text
- Specify the number of blank lines between the body of the report
and the first line of final text. The value for this entry can be
any number from 1 through 999 or the word BOTTOM. The default is 0.
For example, if you want one blank line between the body of the report and the first line of final text, type 1 in this field. If you want the final text to be separated from the body by two blank lines, type 2 in this field.
If you want the final text to be displayed at the bottom of the current page (regardless of where the body of the report ends) type BOTTOM (or B) in this field.
- D LINE
- Identify the lines of final text and specify their positions relative
to themselves and to the line at which the final text starts (as indicated
Blank Lines Before Textfield).
The numbers that you choose need not start with 1 or be consecutive. You can choose spacing between the lines of the final text and between the body of the report and the first line of final text. For example, if you have three lines of final text, and you choose LINE values of 1, 3, and 5 for the text, QMF starts the final text at the line you indicated in the
Blank Lines Before Textfield and places one blank line between lines of text. If you do not use 1 as one of your LINE values, QMF does not begin the final text at the line you specified in the
Blank Lines Before Textfield. It leaves extra blank lines, up to the first specified line number. A blank LINE value tells QMF to ignore any associated text.
For example, consider the following values on FORM.FINAL:
LINE ALIGN FINAL TEXT ---- ----- ----------------- 2 LEFT GRAND TOTALS FOR 3 LEFT ALL DEPARTMENTS
These values display on the resulting report as shown in the following figure:
Notice that a blank line appears before the first line of text.
In the example, if you indicated a value of 0 in the
Blank Lines Before Textfield, you might expect the text
GRAND TOTALS FORon the line immediately following the body of the report. But because the first line of text has a LINE value of 2, QMF skips one blank line (for the missing first line of the final text), and then prints the first line from FORM.FINAL on the second line of the final text in the report.
If you use the same LINE value for more than one line, those lines are joined according to the ALIGN value for the additional line or lines. Lines with the same LINE value overlay each other if their ALIGN values are the same or otherwise conflict. For example, you can specify the same LINE value for two lines of final text, with an ALIGN value of LEFT for the first line and an ALIGN value of CENTER for the second line. If the text on the first line extends past the center of the report, the second line overlays part of the first line.
- E ALIGN
- Specify where each line of final text is placed horizontally in
a report. If a report contains final summary data, the line length
for the final text is from the left margin to the beginning of the
However, if a report does not contain final summary data, the line length for the final text is the complete length of the line (from the left to the right margin). For an online report, the line length is the width of the displayed report; for a printed report, the line length is the width of the printed report.
- Left-justifies the line of final text.
- Right-justifies the line of final text. This setting is the default.
- Centers the line of final text.
- Begins the line of final text in the nth position of the line, where n can be any number from 1 through 999999.
- Positions the line at the end of the previous line of final text.
If APPEND is used on the first line of final text (that is, on the
line of text with the lowest LINE value), the line of text is left-aligned.
The appended line of text must have the same LINE value as the line of text it is being appended to. If the report is not wide enough to accommodate the appended line of text, some of the text might be truncated.
For example, consider the following entries on FORM.FINAL:
Blank Lines Before Text ===> 0 LINE ALIGN FINAL TEXT ---- ------ ----------------- 1 RIGHT TOTAL 1 APPEND SALARIES 3 RIGHT
These values produce a report like this:
DEPT COMM JOB SALARY ------ ---------- ----- ---------- 66 55.50 CLERK 10988.00 . . . 1285.00 SALES 17844.00 ---------- * 66147.00 ========== TOTAL SALARIES 152223.20
- F FINAL TEXT
- You can add up to 999 lines of final text using the INSERT command.
Each line of text can be up to 55 characters long. You can add text
to the line by using APPEND as the ALIGN value or by specifying a
specific horizontal position.
By default, final text extends from the left margin of a report to the beginning of the summary data (if a report has summary data) or to the right margin of a report. However, you can specifically choose the width of final text by changing the
Report text line widthentry on FORM.OPTIONS.
To make the final text appear in a report in uppercase and lowercase, specify a CASE value of either STRING or MIXED in your profile.
Final text can contain the following variable values:
- Global variables
- Use SET GLOBAL to set variables for use in final text.
- The last value in the nth column on the form that is used for this report.
- The number of rows that are displayed or printed since the last break. This value is a running count and increases from data row to data row.
- The number of the last data row of the entire report is printed or displayed in your report.
- Calculated value.
- The current date.
- The current time.
- The current page number.
- n is a valid column number, and a is
one of the following QMF aggregation
functions: AVG, COUNT, CPCT, CSUM, FIRST, LAST, MAX, MIN, PCT, STDEV,
SUM, TCPCT, TPCT. The values of the aggregations are based on running
values within the current break level.
If you use a percent aggregation variable (PCT, TPCT, or TCPCT) in detail block text, and if you associate it with a column that has a D edit code, QMF formats the percent value in the detail block text as if it had an L edit code. Likewise, if you use the STDEV aggregation variable in detail block text and associate it with a column that has a P or a D edit code, QMF formats the standard deviation in the detail block text as if it had an L edit code.