Summary lines in tables

Table views can display a summary line, to show aggregate values for columns.

To get a summary line in a table, define aggregate field item tags at the bottom of the TABLE container, with the corresponding AGGREGATE form item definitions in the ATTRIBUTES section.

Important:

This feature is not supported on mobile platforms.

Define the type of the aggregate field with the AGGREGATETYPE attribute: The aggregate value can be automatically computed, or set by program.

To get a global label for the summary line, specify the AGGREGATETEXT attribute at the TABLE level. This aggregate label will appear on the left in the summary line, if no aggregate text is defined at the aggregate field level.

To decorate the summary line, use presentation style attributes such as summaryLineAlwaysAtBottom.

This example defines a "total" aggregate field for the third column of the table:
TABLE (AGGREGATETEXT="Total")
{
 [c1  |c2          |c3         ]
 [c1  |c2          |c3         ]
                   [total      ]
}
END
...
ATTRIBUTES
...
AGGREGATE total = FORMONLY.total, AGGREGATETYPE=PROGRAM;
...

For details, see Aggregate fields.