TOTAL Modifier

TOTAL is an output modifier that calculates and displays totals for numeric attributes. It must be placed immediately before the name of the attribute to be totalled.

Format

TOTAL attribute [limiters]

Parameter(s)

attribute

Name of the attribute to be totalled.

limiters

Totals only data matching the specified criterion. The criterion is expressed by a relational operator and a constant. The constant should be enclosed in double quotes or backslashes.

Description

The total appears at the end of the report in the column of the specified attribute. It is preceded and followed by a blank line.

The total is identified by three asterisks in the item-ID column. These can be replaced with any text by including the GRAND-TOTAL modifier in the INFO/ACCESS query.

When the TOTAL modifier is used with the BREAK-ON modifier, the report includes a subtotal for each control break as well as a total for the whole report.

Example

This example produces a report that totals the amount for all orders with an amount less than 100:

>LIST ORDERS WITH AMOUNT < "100" TOTAL AMOUNT

 

 

PAGE   1

15:12:49  DD MMM YYYY

 

 

ORDERS....

AMOUNT....

 

 

10116

$40.00

10119

$40.00

10122

$40.00

10101

$18.00

10123

$40.00

10102

$69.00

10114

$45.00

10106

$60.00

10121

$60.00

10124

$40.00

 

 

***

 

 

 

10 ITEMS LISTED.

 

 

>

 

See Also

Using INFO/ACCESS Connectives, Modifiers and Options

Connectives

Relational Operators

Modifiers

Options

Connectives, Modifiers and Options Summary