|
ACCUMULATE expression ( aggregate-phrase )
|
|
AVERAGE COUNT MAXIMUM MINIMUM TOTAL SUB-AVERAGE
SUB-COUNT SUB-MAXIMUM SUB-MINIMUM SUB-TOTAL BY break-group |
|
FOR EACH Customer NO-LOCK:
ACCUMULATE Customer.CreditLimit (AVERAGE COUNT MAXIMUM).END. DISPLAY "MAX-CREDIT STATISTICS FOR ALL CUSTOMERS:" SKIP(2) "AVERAGE =" (ACCUM AVERAGE Customer.CreditLimit) SKIP(1) "MAXIMUM =" (ACCUM MAXIMUM Customer.CreditLimit) SKIP(1) "NUMBER OF CUSTOMERS =" (ACCUM COUNT Customer.CreditLimit) SKIP(1) WITH NO-LABELS. |
|
FOR EACH Item NO-LOCK:
ACCUMULATE Item.OnHand * Item.Price (TOTAL). END. FOR EACH Item NO-LOCK BY Item.OnHand * Item.Price DESCENDING: DISPLAY Item.ItemNum Item.OnHand Item.Price Item.OnHand * Item.Price LABEL "Value" 100 * (Item.OnHand * Item.Price) / (ACCUM TOTAL Item.OnHand * Item.Price) LABEL "Value %". END. |
|
FOR EACH Customer NO-LOCK BREAK BY Customer.SalesRep BY Customer.Country:
ACCUMULATE Customer.Balance (TOTAL BY Customer.SalesRep BY Customer.Country). DISPLAY Customer.SalesRep WHEN FIRST-OF(Customer.SalesRrep) Customer.Country Customer.Name Customer.Balance. IF LAST-OF(Customer.Country) THEN DISPLAY ACCUM TOTAL BY Customer.Country Customer.Balance COLUMN-LABEL "Country!Total". IF LAST-OF(Customer.SalesRep) THEN DO: DISPLAY Customer.SalesRep ACCUM TOTAL BY Customer.SalesRep Customer.Balance COLUMN-LABEL "SalesRep!Total". DOWN 1. END. END. |