Tabular reports

Tabular reports in QMF for Workstation provide users with the capability to formulate and present raw data from query results in a tabular report. The design interface includes a Design view for designing and structuring report data and a Runtime view for viewing how the report output is displayed.

The following figure shows an example of a tabular report in Design view.

Figure 1. A tabular report in Design view
This figure shows a tabular report in the Design view. The view displays the column names that will appear in the report as well as the total width of those columns, as well as displaying formatting choices for headings, footings, final text, breaks 1 and 2, and other options.

The following figure shows an example of a tabular report in the raw data view.

Figure 2. A tabular report in the raw data view.
This figure shows a tabular report in the raw data view, which shows the data from which the report is generated.

The following figure shows an example of a tabular report in the default view.

Figure 3. A tabular report in the default view.

Creating custom tabular reports with QMF for TSO and CICS® is easy; you can start with a template report that has default column headings and a default layout. Then you can tailor the default report with formatting specifications that control different areas of the report.

The following figure shows a report produced in QMF for TSO and CICS that groups salaries in each department by job.

Figure 4. A tabular report in QMF for TSO and CICS
    REPORT                                           LINE 1      POS 1
 
 
              <------------------ JOB ------------------>
              <-- CLERK -->  <--- MGR --->  <-- SALES -->  <-- TOTAL -->
                      SUM            SUM            SUM            SUM
        DEPT         SALARY         SALARY         SALARY         SALARY
      ------    -----------    -----------    -----------    -----------
          10                    $83,463.45                    $83,463.45
          15     $24,766.70     $20,659.80     $16,502.83     $61,929.33
          20     $27,757.35     $18,357.50     $18,171.25     $64,286.10
          38     $24,964.50     $17,506.75     $34,814.30     $77,285.55
          42     $22,014.50     $18,352.80     $18,001.75     $58,369.05
          51     $27,829.80     $21,150.00     $37,111.00     $86,090.80
          66     $10,988.00     $18,555.50     $56,532.70     $86,076.20
          84     $13,030.50     $19,818.00     $33,298.50     $66,147.00
                ===========    ===========    ===========    ===========
                $151,351.35    $217,863.80    $214,432.33    $583,647.48
 
 
                                 ABC Mechanical, Inc.
Using QMF for TSO and CICS forms, you can change text, spacing, and alignment on virtually any area of the report. You can also:
  • Group, aggregate, and summarize data.
  • Define new columns not originally present in the query results.
  • Perform calculations on your data using either simple operators or REXX expressions.
  • Define conditional formatting, which allows you to define data-dependent formatting variations for the report.
  • Fix columns in a large report so that you can easily compare later columns against earlier ones.

When you make changes to a QMF form, you can see the results immediately on the report without having to repeatedly fetch information from the database.

The QMF form object is composed of the following nine panels on which you indicate your report formatting specifications.
FORM.MAIN
Used to specify the basic format for the report

This form panel is shown in Figure 5.

FORM.BREAKn
Allows you to specify text before and after breaks in a report

There are six break panels (FORM.BREAK1 through FORM.BREAK6), allowing you to specify summary text for up to six breaks in the report.

FORM.CALC
Allows you to specify up to 999 calculation expressions in a report

FORM.COLUMNS
Allows you to specify the format of columns in the report as well as how to format the data in each column when that data appears in a chart

FORM.CONDITIONS
Used together with FORM.DETAIL to specify conditional formatting in the report

Conditional formatting allows you to create expressions that control when the formatting variations that have been specified in FORM.DETAIL are to be used in the report. If the condition evaluates to true, the formatting specifications associated with that condition are applied to the report.

FORM.DETAIL
Allows you to create up to 99 formatting variations, each associated with a condition that you specify on the FORM.CONDITIONS panel

FORM.FINAL
Controls the content and placement of final text in a report

FORM.OPTIONS
Allows you to fix the position of columns in the report, which divides the report into a fixed area and a scrollable area, so that you can easily compare multiple columns in a large report

This panel also allows you to summarize data across columns in the report as well as make other detailed formatting adjustments.

The following figure shows formatting options available on FORM.MAIN, the main panel of the QMF form. If all the columns in the form are not visible on the panel, you can scroll forward and backward to see those you want.
Figure 5. Formatting options on the FORM.MAIN panel
FORM.MAIN                                            MODIFIED
 
COLUMNS:               Total Width of Report Columns: 23 + (N X 15)
           A                          B        C        D       E       F 
NUM  COLUMN HEADING                  USAGE    INDENT   WIDTH   EDIT   SEQ
---  ------------------------------  -------  ------   -----   -----  ---
  1  DEPT                            GROUP    2        6       L       1
  2  JOB                             ACROSS   2        5       C       2
  3  SALARY                          SUM      2        11      D2      3
 
  PAGE:       HEADING  ===>        G 
              FOOTING  ===> COMPANY NAME
  FINAL:      TEXT     ===>        H 
  BREAK1:     NEW PAGE FOR BREAK? ===> NO
              FOOTING  ===> DEPT. &2 TOTALS     I 
  BREAK2:     NEW PAGE FOR BREAK? ===> NO
              FOOTING  ===>
  OPTIONS:    OUTLINE? ===> YES      DEFAULT BREAK TEXT? ===> NO       J 
 
 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 displayed.
 COMMAND ===>                                            SCROLL ===> PAGE
 
With these entry areas, you can do the following tasks:
 A 
Assign column headings.

 B 
Specify a usage code for the column, which indicates how to group, summarize, or aggregate the data in the column. For example, you can choose to summarize data across the rows in a report in addition to within each column.

 C 
Adjust the indentation of each column.

 D 
Adjust the width of each column.

 E 
Specify an edit code for the column, which indicates how values in the column are to be formatted.

QMF provides default edit codes for each data type as well as an edit exit interface to allow you to create your own codes and associate them with formatting routines. For example, you can format values in scientific versus decimal notation or control the sign and separators for monetary values.

 F 
Change the sequence of columns.

 G 
Specify a heading and footing for the top and bottom of each page.

 H 
Specify the final text at the end of the report.

 I 
Enter footing text to use when the value in a designated control column changes.

 J 
Specify the formatting of repeated values within a designated control break.

You can apply the same formatting specifications to different sets of query results, saving you time and helping you to maintain reporting consistency across your organization.