Using QMF


Mixing tabular data with reformatted text

You can mix tabular data and reformatted text within blocks of text.

To mix tabular and detail block text:

  1. Run the query and display the report.

    For this example, run the following SQL query:

    SELECT ACCTNO, COMPANY, NOTES
      FROM Q.SUPPLIER
    
  2. On the QMF command line, enter:
    SHOW FORM.COLUMNS
    

    For this example, make the following changes on the FORM.COLUMNS panel:

    1. Specify an OMIT usage code for all columns except the NOTES column, because the NOTES column is the only column you'll be displaying as tabular data.
    2. Change the edit code for the NOTES column to CT to allow text wrapping within the column, and the width to 40.
  3. On the QMF command line, enter:
    SHOW FORM.DETAIL
    
  4. Make the following changes on the FORM.DETAIL panel:
    1. In the Include Column Headings with Detail Headings? field, type NO so that the column headings will not appear after the detail heading text.
    2. In the Blank Lines after Block field, type 6.
    3. Specify the line number on which you want to display the tabular data in the Put Tabular Data at Line field. Make sure you specify different line numbers for the detail block text and the tabular data. Otherwise, one will overlay the other when you display the report. For this example, type 4.
    4. Type the information for the detail block text. For this example, type Company: &2 for the first line. Type Account Number: &1 for the second line. Type Notes: for the third line.

      You do not have to specify a form variable for the tabular data. The data will follow the last line of detail block text.

    For more information on specifying detail block text, see Refining the format of your report with detail blocks.

    Figure 129. Specify placement of tabular data with detail block text.

    +--------------------------------------------------------------------------------+
    | 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                                                                     |
    |               *** END ***                                                      |
    |                                                                                |
    | New Page for Detail Block? ===> NO      Repeat Detail Heading?    ===> NO      |
    | Keep Block on Page?        ===> NO      Blank Lines after Block   ===> 6       |
    | Put Tabular Data at Line (Enter 1-999 or NONE) ===> 4                          |
    | LINE  ALIGN   DETAIL BLOCK TEXT                                                |
    | ----  ------  ----+----1----+----2----+----3----+----4----+----5----+          |
    | 1     LEFT    COMPANY:  &2;                                                    |
    | 2     LEFT    ACCOUNT NUMBER:  &1;                                             |
    | 3     LEFT    NOTES:                                                           |
    |                                                                                |
    | Select Panel Variation?    ===> NO                                             |
    |                                                                                |
    +--------------------------------------------------------------------------------+
  5. Press the Report function key to see the changed report.

    Figure 130. The changed report shows tabular data mixed with a detail block.

    +--------------------------------------------------------------------------------+
    |COMPANY: WESTCO, INC.                                                           |
    | ACCOUNT NUMBER: 1100P                                                          |
    | NOTES:                                                                         |
    |   THIS COMPANY HAS A STRONG HISTORY OF                                         |
    |   ON-TIME DELIVERY.  WESTCO IS GROWING                                         |
    |   QUICKLY.                                                                     |
    +--------------------------------------------------------------------------------+

When you omit some columns from the report, as in this example, you reduce the automatic total width of the report. Make sure that your report is wide enough to include all of the detail block text. You can change the width of your report by changing the Report text line width field on the FORM.OPTIONS panel.


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