Type
Statistical Operator

Purpose
The max operator finds the highest value in a specified field among all the records that are processed. The result appears in the statistical summary areas of the report.

Syntax
VALUE : max [other statistical operators] ;|.

Returns
A value of the same type as the specified value. If the specified value is a Text field, max returns the highest ASCII value.

Usage
max finds the highest value in the specified field among the records being processed.
There's an important difference between the statistical operator max and the relational statistical operator highestof. max finds the highest value in the specified field among the records being processed. highest of finds the highest value in the specified field among the records related to the records being processed.

Example
for MEMBERS with TOTAL DUE > 150 ;
list records
LAST NAME in order ;
TOTAL DUE : item max sum .
end

This script tells DataEase: (1) Process all the MEMBERS records that have a value greater than $150 in the TOTAL DUE field, (2)list the members by LAST NAME in alphabetical order, and (3) list each member's TOTAL DUE and include the largest TOTAL DUE amount and the sum of all the TOTAL DUE amounts in the report output.
The output from this script might look as follows:

Last Name
Total Due
Archer
$155.00
Christino
$280.00
Forrest
$175.00
Jones
$175.00
Morelli
$155.00
Perrault...
$215.00...
Max Total Due:
$280.00
Sum Total Due:
$2050.00