Using QMF


Changing the columns on your report

The first step in producing the report that is shown in Figure 76 is to change the appearance of the columns. To change columns, display the FORMS panels for the report.

To display the FORMS panels for a report:

  1. Retrieve the data to display on the report by using either a prompted query or an SQL query.

    Figure 77 shows the prompted query for the first few examples in this chapter. You can save this query and use it wherever you need it for the examples in this chapter. For example, on the QMF command line, enter:

    SAVE QUERY AS NEWQUERY
    

    Figure 77. This query produces the data for the report.

    +--------------------------------------------------------------------------------+
    |PROMPTED QUERY                                       MODIFIED  LINE    1        |
    |                                                                                |
    |   Tables:                                                                      |
    |     Q.STAFF   (1)                                                              |
    |                                                                                |
    |   Columns:   (2)                                                               |
    |     NAME                                                                       |
    |     DEPT                                                                       |
    |     JOB                                                                        |
    |     SALARY                                                                     |
    |     COMM                                                                       |
    |                                                                                |
    |   Row Conditions:   (3)                                                        |
    |     If DEPT Is Equal To 15, 20 or 38                                           |
    |     And JOB Is Not Equal To 'MGR'                                              |
    |                                                                                |
    |   Sort:  (4)                                                                   |
    |     Ascending by DEPT                                                          |
    |     Ascending by NAME                                                          |
    +--------------------------------------------------------------------------------+

    (1)
    QMF retrieves the data from the Q.STAFF table.

    (2)
    QMF displays these columns on the report.

    (3)
    The employees are nonmanagers from departments 15, 20, and 38.

    (4)
    QMF orders the rows by department number, and then by name.
  2. Run the query to display the report.

  3. On the QMF command line, enter SHOW FORM.MAIN.

    The FORM.MAIN panel displays with the default report format for this report:

    Figure 78. You can change column appearance on the QMF FORM.MAIN panel.

    +--------------------------------------------------------------------------------+
    |FORM.MAIN                                                                       |
    |                                                                                |
    | COLUMNS:               Total Width of Report Columns: 50                       |
    |  NUM COLUMN HEADING                           USAGE   INDENT WIDTH EDIT  SEQ   |
    |  --- ---------------------------------------- ------- ------ ----- ----- ---   |
    |    1 NAME                                             2      9     C     1     |
    |    2 DEPT                                             2      6     L     2     |
    |    3 JOB                                              2      5     C     3     |
    |    4 SALARY                                           2      10    L2    4     |
    |    5 COMM                                             2      10    L2    5     |
    |                                                                                |
    | PAGE:    HEADING  ===>                                                         |
    |          FOOTING  ===>                                                         |
    | FINAL:   TEXT     ===>                                                         |
    | BREAK1:  NEW PAGE FOR BREAK? ===> NO                                           |
    |          FOOTING  ===>                                                         |
    | BREAK2:  NEW PAGE FOR BREAK? ===> NO                                           |
    |          FOOTING  ===>                                                         |
    | OPTIONS: OUTLINE? ===> YES                DEFAULT BREAK TEXT? ===> YES         |
    |                                                                                |
    | 1=Help     2=Check    3=End          4=Show          5=Chart         6=Query   |
    | 7=Backward 8=Forward  9=            10=Insert       11=Delete       12=Report  |
    | OK, FORM.MAIN is shown.                                                        |
    | COMMAND ===>                                                  SCROLL ===> PAGE |
    +--------------------------------------------------------------------------------+

    You can make changes to the columns on the FORM.MAIN panel. However, in this example, you will see how to use the FORM.COLUMNS panel to make all the changes to the columns on your report.

  4. Enter SHOW FORM.COLUMNS.

The FORM.COLUMNS panel displays with the default column information for this report.

Figure 79. The FORM.COLUMNS panel

+--------------------------------------------------------------------------------+
| FORM.COLUMNS                                         MODIFIED                  |
|                                                                                |
|                        Total Width of Report Columns: 62                       |
|  NUM COLUMN HEADING                           USAGE   INDENT WIDTH EDIT  SEQ   |
|  --- ---------------------------------------- ------- ------ ----- ----- ---   |
|    1 NAME                                             2      9     C     1     |
|    2 DEPT                                             2      6     L     2     |
|    3 JOB                                              2      5     C     3     |
|    4 SALARY                                           2      10    L2    4     |
|    5 COMM                                             2      10    L2    5     |
|    6 TOTAL_EARNINGS                                   2      10    C     5     |
|      *** END ***                                                               |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
| 1=Help     2=Check    3=End          4=Show          5=Chart         6=Query   |
| 7=Backward 8=Forward  9=Specify     10=Insert       11=Delete       12=Report  |
| OK, CANCEL command executed successfully.                                      |
| COMMAND ===>                                                  SCROLL ===> PAGE |
+--------------------------------------------------------------------------------+


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