Using QMF

Adding break heading and footing text to a report

You can add heading and footing text for each break segment in your report by using the FORM.BREAK panels.

In the following example, you add break heading text for BREAK1 and break heading and footing text for BREAK2.

To add break text:

  1. On the QMF command line, enter:
    SHOW FORM.COLUMNS
    

    The FORM.COLUMNS panel displays.

  2. In the USAGE field, specify up to six breaks for the columns in the report. For this example, type BREAK1 for DEPT and BREAK2 for JOB.

    Figure 111. Specify breaks at the DEPT and JOB columns.

    +--------------------------------------------------------------------------------+
    | FORM.COLUMNS                                         MODIFIED                  |
    |                                                                                |
    |                        Total Width of Report Columns: 128                      |
    |  NUM COLUMN HEADING                           USAGE   INDENT WIDTH EDIT  SEQ   |
    |  --- ---------------------------------------- ------- ------ ----- ----- ---   |
    |    1 ID                                               2      6     L     1     |
    |    2 NAME                                             2      9     C     2     |
    |    3 DEPT                                     BREAK1  2      6     L     3     |
    |    4 JOB                                      BREAK2  2      5     C     4     |
    |    5 YEARS                                            2      6     L     5     |
    |        .                                                                       |
    |        .                                                                       |
    |        .                                                                       |
    |      *** END ***                                                               |
    +--------------------------------------------------------------------------------+
  3. Press the Report function key to see the changed report.

    Figure 112. The changed report shows breaks after each department and job.

    +--------------------------------------------------------------------------------+
    |       ID  NAME         DEPT  JOB     YEARS|  MANAGER  DIVISION    LOCATION     |
    |   ------  ---------  ------  -----  ------|  -------  ----------  -------------|
    |      330  BURKE      (1) 66  CLERK       1|      270  WESTERN     SAN FRANCISCO|
    |                                           |                               (2) *|
    |                                           |                                    |
    |      270  LEA           (2)  MGR         9|      270  WESTERN     SAN FRANCISCO|
    |                                           |                               (2) *|
    |                                           |                                    |
    |      280  WILSON                         9|      270  WESTERN     SAN FRANCISCO|
    |      310  GRAHAM                        13|      270  WESTERN     SAN FRANCISCO|
    |      320  GONZALES       (2) SALES       4|      270  WESTERN     SAN FRANCISCO|
    |                                           |                                    |
    |                                           |                                   *|
    |                                           |                              (1) **|
    |                                           |                                    |
    |      350  GAFNEY         84  CLERK       5|      290  WESTERN     DENVER       |
    |                                           |                                   *|
    |      290  QUILL              MGR        10|      290  WESTERN     DENVER       |
    |                                           |                                   *|
    |      340  EDWARDS            SALES       7|      290  WESTERN     DENVER       |
    |      300  DAVIS                          5|      290  WESTERN     DENVER       |
    +--------------------------------------------------------------------------------+

    (1)
    Shows a first-level break.

    (2)
    Shows a second-level break.
  4. On the QMF command line, enter:
    SHOW FORM.BREAKn
    

    Where n is the break level. For this example, enter:

    SHOW FORM.BREAK1
    

    The FORM.BREAK panel for the break level you specified displays. You specify break heading and footing text on this panel.

  5. Leave the defaults, or type new values for the New Page for Break, Blank Lines Before Heading, Repeat Detail Heading?, and Blank Lines After Heading fields.

    For this example, type 2 for Blank Lines After Heading.

  6. Type the break text for each line under the BREAK 1 HEADING TEXT heading. You can use form variables in the text.

    In this example, type Department number &3, Department name &9 for the first line of text, and Manager: &10 for the second line of text.

    Line 1 contains the form variable &3 for department number, and &9 for department name. Line 2 contains the form variable &10 for the ID number of the manager for the department.

    You can specify either left or right justification of the text, or align the text at a specific column.

    If all the break text for one line does not fit in the space allowed on that line, type APPEND in the ALIGN column of the next line. Then, change its line number to the same number as the preceding line, and continue typing the text. Be sure to indent the appended text at least one space.

    If you need another line, move the cursor to the line above the place you want the new line and press the Insert function key. You can specify up to 999 lines of text.

    For this example, leave the default of LEFT.

    Figure 113. Specify headings and footings for report breaks on FORM.BREAK.

    +--------------------------------------------------------------------------------+
    | LINE  ALIGN   BREAK 1 HEADING TEXT                                             |
    | ----  ------  ----+----1----+----2----+----3----+----4----+----5----+          |
    | 1     LEFT    Department number &3, Department name &9                         |
    | 2     LEFT    Manager: &10                                                     |
    +--------------------------------------------------------------------------------+
  7. Specify text for the break footing in the same way you specify text for the break heading.

    For this example, do not specify footing text for the level-one break.

    For the second break, on the JOB column, enter both heading and footing text.

  8. On the QMF command line, enter:
    SHOW FORM.BREAK2
    
  9. For this example, type Position: &4 for the first line of heading text.
  10. Change the alignment toLEFT and type ===> Number in &4 position in Department &3: for the first line of footing text.
  11. Change the line number in the LINE field for the second line of footing text from 2 to 1.
  12. Type APPEND in the ALIGN field for the second line of footing text.
  13. Type &COUNT2 in the BREAK 2 FOOTING TEXT field. Be sure to leave a space at the beginning of the second line of text. These two lines appear as one line on the report. The variable &COUNT2 is an aggregation variable that counts the number of values for column 2, NAME.

    Figure 114 shows the completed FORM.BREAK2 panel for this example.

    Figure 114. Specify text for the second break on FORM.BREAK2.

    +--------------------------------------------------------------------------------+
    |  FORM.BREAK2                                          MODIFIED                 |
    |  New Page for Break?        ===> NO      Repeat Detail Heading?    ===  > NO   |
    |  Blank Lines Before Heading ===> 0       Blank Lines After Heading ===  > 1    |
    |  LINE  ALIGN   BREAK 2 HEADING TEXT                                            |
    |  ----  ------  ----+----1----+----2----+----3----+----4----+----5----+         |
    |  1     LEFT    Position: &4                                                    |
    |  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 2 FOOTING TEXT                                            |
    |  ----  ------  ----+----1----+----2----+----3----+----4----+----5----+         |
    |  1     LEFT    ===> Number in &4 position in Department &3:                    |
    |  1     APPEND    &COUNT2                                                       |
    |  3     RIGHT                                                                   |
    |                *** END ***                                                     |
    +--------------------------------------------------------------------------------+

    For more information on all the fields on the BREAK panels, see the QMF Reference, SC26-4716-05.

  14. Press the Report function key to see the changed report.Figure 115 shows how the changed report should look.

    Figure 115. The changed report shows first and second level break text.

    +--------------------------------------------------------------------------------+
    | EMPLOYEE DATA FOR THE WESTERN DIVISION                                         |
    | DATE: 1998-03-17                                                               |
    |                                                                                |
    |                                                                                |
    |       ID  NAME         DEPT  JOB     YEARS      SALARY        COMM  DEPTNUMB   |
    |   ------  ---------  ------  -----  ------  ----------  ----------  --------   |
    | DEPARTMENT NUMBER 66, DEPARTMENT NAME PACIFIC                                  |
    | MANAGER:  270                                                                  |
    |                                                                                |
    |                                                                                |
    | POSITION:  CLERK                                                               |
    |                                                                                |
    |      330  BURKE          66  CLERK       1    10988.00       55.50        66   |
    |                                                                                |
    | ===> NUMBER IN CLERK POSITION IN DEPARTMENT 66: 1                              |
    |                                                                                |
    | POSITION:  MGR                                                                 |
    |                                                                                |
    |      270  LEA            66  MGR         9    18555.50           -        66   |
    |                                                                                |
    | ===> NUMBER IN MGR POSITION IN DEPARTMENT 66: 1                                |
    |                                                                                |
    | POSITION:  SALES                                                               |
    |                                                                                |
    |      320  GONZALES           SALES       4    16858.20      844.00        66   |
    |      310  GRAHAM                        13    21000.00      200.30        66   |
    |      280  WILSON                         9    18674.50      811.50        66   |
    |                                                                                |
    | ===> NUMBER IN SALES POSITION IN DEPARTMENT 66: 3                              |
    |                                                                                |
    | DEPARTMENT 84, DEPARTMENT NAME MOUNTAIN                                        |
    | MANAGER:  290                                                                  |
    |                                                                                |
    | POSITION:  CLERK                                                               |
    |                                                                                |
    |      350  GAFNEY         84  CLERK       5    13030.50      188.00        84   |
    |                                                                                |
    | ===> NUMBER IN CLERK POSITION IN DEPARTMENT 84: 1                              |
    |                                                                                |
    | POSITION:  MGR                                                                 |
    |                                                                                |
    |      290  QUILL          84  MGR        10    19818.00           -        84   |
    |                                                                                |
    | ===> NUMBER IN MGR POSITION IN DEPARTMENT 84: 1                                |
    |                                                                                |
    | POSITION:  SALES                                                               |
    |                                                                                |
    |      340  EDWARDS            SALES       7    17844.00     1285.00        84   |
    |      300  DAVIS                          5    15454.50      806.10        84   |
    |                                                                                |
    | ===> NUMBER IN SALES POSITION IN DEPARTMENT 84: 2                              |
    |                                                                                |
    |                                                                                |
    | ** COMPANY NAME **                                                             |
    |                                                                                |
    |                                                                                |
    +--------------------------------------------------------------------------------+


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