FORM.FINAL
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.
FORM.FINAL
A New Page for Final Text?===> NO B Put Final Summary at Line ===> 1
C Blank Lines Before Text ===> 0
D LINE E ALIGN F FINAL TEXT
---- ------ ----+----1----+----2----+----3----+----4----+----5----+
1 RIGHT
2 RIGHT
3 RIGHT
*** END ***
1=Help 2=Check 3=End 4=Show 5=Chart 6=Query
7=Backward 8=Forward 9= 10=Insert 11=Delete 12=Report
OK, FORM.FINAL is displayed.
COMMAND ===> SCROLL ===> PAGE
- A New page for final text?
- Reports
- 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
- Reports
- 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).
- Charts
- 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
- Reports
- 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
- Reports
- 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
in the
Blank Lines Before Text
field).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 Text
field 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 theBlank Lines Before Text
field. 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:
Figure 2. Adding a blank line before final text in a report GRAND TOTALS FOR ALL DEPARTMENTS
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 Text
field, you might expect the textGRAND TOTALS FOR
on 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
- Reports
- 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
summary data.
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
- Left-justifies the line of final text.
- Right
- Right-justifies the line of final text. This setting is the default.
- Center
- Centers the line of final text.
- n
- Begins the line of final text in the nth position of the line, where n can be any number from 1 through 999999.
- Append
- 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
- Reports
- 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 width
entry 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.
- &n
- The last value in the nth column on the form that is used for this report.
- &COUNT
- 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.
- &ROW
- The number of the last data row of the entire report is printed or displayed in your report.
- &CALCid
- Calculated value.
- &DATE
- The current date.
- &TIME
- The current time.
- &PAGE
- The current page number.
- &an
- 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.