Previous Topic: Headings Syntax DiagramNext Topic: Accumulating Subtotals


Totals Syntax Diagram

Purpose

The PRINT statement can be used to accumulate subtotals and totals for specified numeric columns, including floating-point columns.

Operation

You can use the basic PRINT syntax to accumulate totals. The column or columns to be accumulated must be enclosed in parentheses.

Syntax Diagram

The following syntax diagram shows how to add parentheses to key or column names in the PRINT statement to cause totaling at control breaks (if any) and at the end of the report.

►►─ PRINT ─┬────────┬─┬─────────────────────────────┬─┬─────┬─────────────────►
           └─ FROM ─┘ └─ table-name ─┬────────────┬─┘ └─ ( ─┘
                                     └─ (status) ─┘

 ►─┬─ key-name ────┬─┬─────┬─┬─────────────────────────────────┬──────────────►
   └─ column-name ─┘ └─ ) ─┘ └─ 'heading1 ─┬─────────────┬─ ' ─┘
                                           └─ /heading2 ─┘

 ►─┬──────────────────────────┬───────────────────────────────────────────────►◄
   └─ PICture 'edit-pattern' ─┘