You can reformat and add text to your report with detail blocks. A detail block is a set of specifications that tells QMF to put in whatever special formatting you want for one row of the data retrieved by your query.
Specify detail blocks on the FORM.DETAIL panel. You can use the panel to do the following:
In the following example, you use the FORM.DETAIL panel to reformat the report in Figure 115. You will also remove the column headings from the report, omit tabular data (columns), and add headings for each subsection. When you finish, the report will look like Figure 118.
To specify detail blocks:
DISPLAY FORM.DETAIL
The FORM.DETAIL panel displays.
Figure 116. Specify text for the detail heading on FORM.DETAIL.
+--------------------------------------------------------------------------------+ | FORM.DETAIL MODIFIED Var 1 of 1 | | | | Include Column Headings with Detail Heading? ===> NO | | LINE ALIGN DETAIL HEADING TEXT | | ---- ------ ----+----1----+----2----+----3----+----4----+----5----+ | | 1 LEFT ***************************** | | 2 LEFT ** PERSONNEL STATUS REPORT ** | | 3 LEFT ***************************** | | | | New Page for Detail Block? ===> NO Repeat Detail Heading? ===> NO | | Keep Block on Page? ===> NO Blank Lines after Block ===> 0 | | Put Tabular Data at Line (Enter 1-999 or NONE) ===> 1 | | LINE ALIGN DETAIL BLOCK TEXT | | ---- ------ ----+----1----+----2----+----3----+----4----+----5----+ | | 1 LEFT | | 2 LEFT | | *** END *** | | | | Select Panel Variation? ===> YES | | | +--------------------------------------------------------------------------------+
If you leave YES, the column headings display immediately after any detail heading text in the report.
For this example, type the text as it is shown on the FORM.DETAIL panel in Figure 116. You need to insert an extra line and change its line number.
Next, you rearrange the data from each column into a vertical list, rather than a tabular arrangement of columns and rows. You also give each column value a new label to replace the column headings. You specify the format of the detail block on the bottom half of the FORM.DETAIL panel.
For this example, type 1 for Blank Lines After Block.
For this example, type NONE, to remove all the tabular data from the report.
For this example, type the text as it is shown on the following FORM.DETAIL panel.
Figure 117. Specify replacement column headings with detail block text.
+--------------------------------------------------------------------------------+ | LINE ALIGN DETAIL BLOCK TEXT | | ---- ------ ----+----1----+----2----+----3----+----4----+----5----+ | | 1 LEFT Employee: &2 | | 2 LEFT ID: &1 | | 3 LEFT Years of Service: &5 | | 4 LEFT Salary: &6 | | 5 LEFT Commission: &7 | +--------------------------------------------------------------------------------+
You can create variations of the detail blocks to use with different conditions in a report format with panel variations. For more information on creating panel variations, see the QMF Reference, SC26-4716-05 .
Figure 118. The changed report shows the results of reformatting.
+--------------------------------------------------------------------------------+ | Employee Data for the WESTERN Division | | Date: 1998-03-17 | | | | | | ***************************** | | ** Personnel Status Report ** | | ***************************** | | Department number 66, Department name PACIFIC | | Manager: 270 | | | | | | Position: CLERK | | Employee: BURKE | | ID: 330 | | Years of Service: 1 | | Salary: 10988.00 | | Commission: 55.50 | | | | | | ===> Number in CLERK position in Department 66: 1 | | | | Position: MGR | | EMPLOYEE: LEA | | ID: 270 | | Years of Service: 9 | | Salary: 18555.50 | | Commission: - | | | | | | ===> Number in MGR position in Department 66: 1 | +--------------------------------------------------------------------------------+