FOR EACH Customer NO-LOCK BY Customer.SalesRep:
|
FOR EACH Customer NO-LOCK BREAK BY Customer.SalesRep:
|
aggregate-option BY break-group
|
Aggregate option
|
Description
|
AVERAGE
|
Calculates the average of all the expression's values, and calculates the overall average for the break groups
|
SUB-AVERAGE
|
Calculates the average of all the expression's values, but does not calculate the overall average
|
COUNT
|
Counts the number of items in the break group, and calculates the overall count of the break groups
|
SUB-COUNT
|
Counts the number of items in the break group, but does not calculate the overall count
|
MAXIMUM
|
Finds the maximum value of the expression in the break group, and finds the overall maximum of the break groups
|
SUB-MAXIMUM
|
Finds the maximum value of the expression in the break group, but does not find the overall maximum
|
MINIMUM
|
Finds the minimum value of the expression in the break group, and finds the overall minimum of the break groups
|
SUB-MINIMUM
|
Finds the minimum value of the expression in the break group, but does not find the overall minimum
|
TOTAL
|
Calculates the total of all the expression's values, and calculates the overall total for the break group.
|
SUB-TOTAL
|
Calculates the total of all the expression's values, but does not calculate the overall total for the break groups
|
FOR EACH Customer NO-LOCK
BREAK BY Customer.SalesRep: DISPLAY Customer.Balance (TOTAL BY Customer.SalesRep). END. |
/* {i-10-in.i} Common Interface Setup Code */
/********** DEFINE TRIGGERS **********/ ON CHOOSE OF b-rep DO: OUTPUT TO "tut-temp.txt". /*1*/ FOR EACH Customer NO-LOCK BREAK BY Customer.SalesRep WITH STREAM-IO: DISPLAY Customer.SalesRep Customer.Name /*2*/ Customer.Balance (COUNT TOTAL AVERAGE BY Customer.SalesRep). END. OUTPUT CLOSE. ASSIGN Rep-Editor:READ-ONLY IN FRAME dialog1 = TRUE Rep-Editor:SENSITIVE IN FRAME Dialog1 = TRUE FRAME dialog1:TITLE = "Report Output" lStat = Rep-Editor:READ-FILE("tut-temp.txt") IN FRAME Dialog1. IF lStat THEN DO: ENABLE Rep-Editor b-ok WITH FRAME Dialog1. WAIT-FOR GO OF FRAME Dialog1. HIDE FRAME Dialog1. END. END. /* ON CHOOSE OF b-rep */ /********** MAIN LOGIC **********/ ENABLE ALL WITH FRAME Frame1. WAIT-FOR CHOOSE OF b-exit. |