Specifying text for the subtotal line on a report
If you do not specify the text that you want to display, asterisks display at each subtotal line.
Procedure
To specify the text you want to display at each subtotal line in your report:
- Enter SHOW FORM.BREAKn,
where n is the number you specified on the FORM.COLUMNS panel
for this break. In Breaking on a value to add subtotals you specified BREAK1 for the DEPT._NUMBER column, so enter the following on the QMF command line:
SHOW FORM.BREAK1
The FORM.BREAK1 panel displays.
- Type the text you want to display at each subtotal line
in the BREAK 1 FOOTING TEXT field. For this example, type DEPT. &2 TOTALS, as shown in the following figure.
Figure 1. Enter the subtotal text in the BREAK 1 FOOTING TEXT field. FORM.BREAK1 New Page for Break? ===> NO Repeat Detail Heading? ===> NO Blank Lines Before Heading ===> 0 Blank Lines After Heading ===> 0 LINE ALIGN BREAK 1 HEADING TEXT ---- ------ ----+----1----+----2----+----3----+----4----+----5----+ 1 LEFT 2 LEFT 3 LEFT *** END *** New Page for Footing? ===> NO Put Break Summary at Line ===> 1 Blank Lines Before Footing ===> 0 Blank Lines After Footing ===> 1 LINE ALIGN BREAK 1 FOOTING TEXT ---- ------ ----+----1----+----2----+----3----+----4----+----5----+ 1 RIGHT DEPT. &2 TOTALS 2 RIGHT 3 RIGHT *** END ***
The &2 is a form variable that tells QMF to display, for each subtotal line, the current value of column 2. The columns are numbered in the same order in which they were selected in the query; each column's number appears in the NUM column of the FORM.COLUMNS panel. In this example, column 2 is the DEPT._NUMBER column, so the current department number displays as part of the text for each subtotal line.
- Press the Report function key to see the changed report,
which is shown in the following figure.
Figure 2. The changed report shows subtotal text after each department. DEPT. EMPLOYEE TOTAL NUMBER NAME SALARY COMMISSIONS EARNINGS ------ --------- ------------ ----------- ------------ 15 KERMISCH $12,258.50 $110.10 $12,368.60 NGAN $12,508.20 $206.60 $12,714.80 ROTHMAN $16,502.83 $1,152.00 $17,654.83 ------------ ----------- ------------ DEPT. 15 TOTALS $41,269.53 $1,468.70 $42,738.23 20 JAMES $13,504.60 $128.20 $13,632.80 PERNAL $18,171.25 $612.45 $18,783.70 SNEIDER $14,252.75 $126.50 $14,379.25 ------------ ----------- ------------ DEPT. 20 TOTALS $45,928.60 $867.15 $46,795.75 38 ABRAHAMS $12,009.75 $236.50 $12,246.25 NAUGHTON $12,954.75 $180.00 $13,134.75 O'BRIEN $18,006.00 $846.55 $18,852.55 QUIGLEY $16,808.30 $650.25 $17,458.55 ------------ ----------- ------------ DEPT. 38 TOTALS $59,778.80 $1,913.30 $61,692.10 ============ =========== ============ $146,976.93 $4,249.15 $151,226.08