Using QMF


Refining the format of your report with detail blocks

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:

  1. On the QMF command line, enter:
    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                                            |
    |                                                                                |
    +--------------------------------------------------------------------------------+
  2. Because the final report is not in tabular format (columns and rows), you do not want to display the column headings. Type NO in the Include Column Headings with Detail Heading? field for this example.

    If you leave YES, the column headings display immediately after any detail heading text in the report.

  3. Type the detail heading text for each line in the DETAIL HEADING TEXT field. You can use form variables in the text.

    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.

  4. Leave the defaults, or type new values for the New Page for Detail Block?, Repeat Detail Heading?, Keep Block on Page?, and Blank Lines After Block fields.

    For this example, type 1 for Blank Lines After Block.

  5. Type a line number if you want to include tabular data in the report, or type NONE if you want to remove all the tabular data.

    For this example, type NONE, to remove all the tabular data from the report.

  6. Type the detail block text for each line in the DETAIL BLOCK TEXT field. Use form variables and text to provide values for the column headings and column data on 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 .

  7. Press the Report function key to see the changed report.

    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                               |
    +--------------------------------------------------------------------------------+


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]