Previous Topic: ResultsNext Topic: DQL Mode Totaling Options Examples


Changing the Format of DQL Mode Total Output

When a DQL Mode query or dialog selected for execution specifies totals of one or more numeric columns, you can alter the appearance of the query output from the output screen.

The query executed specifies the kinds of totals the query produces and which data is totaled. During output presentation, you can suppress the totals or the detail if totals are specified in the query/dialog report format. You cannot suppress the results of other calculations.

In SQL Mode, you can also alter the report format definition through <PF4> FORMAT REPORT on the ONLINE EXECUTION panel. See Step 2: Define a Report in SQL Mode for details.

Operation

The output PF keys and output commands allow you to specify output variations when totals are specified in the query or on the DQL Mode TOTALING panel at execution.

Be sure to include hyphens in commands where required. Typing a hyphenated command as two words can produce unpredictable results.

DETAIL

Shows all items on the report. For example:

      SALES-REP  CUSTOMER                            YEAR-TO-DATE
         ID       NAME                                   SALES
      --------  ------------------------------  ------------
      52733     UNITED ATLANTIC SHARES               452.00

      TOTAL CITY CHARLOTTE
                                                *    452.00

      52733     SUN DIAL CITRUS GROWERS            21101.50
      52733     SUN DIAL CITRUS GROWERS            21101.50
      52733     SUN DIAL CITRUS GROWERS            21101.50

      TOTAL CITY LOS ANGELES

The command for this presentation is DETAIL.

NO-DETAIL

Shows no data rows. Shows PRINT statement totals and function results. For example:

      TOTAL CITY NEW YORK
                                                *  12000.00

    * GRAND TOTAL
                                                *  75756.50

      AVERAGE YEAR-TO-DATE SALES PER CUSTOMER 0007575.65

The command for this presentation is NO-DETAIL.

TOTALS ONLY

Shows no data rows and no function results. For example:

                              YEAR-TO-DATE
          CITY                  SALES
          ---------------  ------------
          CHARLOTTE             452.00
          LOS ANGELES         63304.50
          NEW YORK            12000.00

        * GRAND TOTAL
                              75756.50

The command for this presentation is TOTALS.

NO TOTALS

Shows no totals or column function results. Detail lines only. For example:

SALES-REP  CUSTOMER                           YEAR-TO-DATE
   ID       NAME                                   SALES
--------  ------------------------------  ------------
52733     UNITED ATLANTIC SHARES               452.00
52733     SUN DIAL CITRUS GROWERS            21101.50
52733     SUN DIAL CITRUS GROWERS            21101.50
52733     SUN DIAL CITRUS GROWERS            21101.50
52733     INTERNATIONAL BANK CORP.            2000.00
52733     INTERNATIONAL BANK CORP.            2000.00
52733     INTERNATIONAL BANK CORP.            2000.00
52733     INTERNATIONAL BANK CORP.            2000.00
52733     INTERNATIONAL BANK CORP.            2000.00
52733     INTERNATIONAL BANK CORP.            2000.00

The command for this presentation is NO-TOT.

WHEN-ONLY

Shows only results of WHEN/DO statements. For example:

  AVERAGE YEAR-TO-DATE SALES 0007575.65

The command for this presentation is WHEN-ONLY.