[progress Communities] [progress Openedge Abl] Forum Post: Re: Calculate No.of Records

Status
Not open for further replies.
R

Ruben Dröge

Guest
DEFINE TEMP-TABLE ttSubTotals FIELD poltype AS CHARACTER FIELD subtotal AS DECIMAL Index ttix IS UNIQUE PRIMARY poltype. DEF VAR subtotal AS DECIMAL. FOR EACH uwm100 WHERE uwm100.comdat > 12/01/14 AND uwm100.comdat < 12/01/2015 NO-LOCK BREAK BY poltype: FOR EACH clm100 WHERE clm100.policy = uwm100.policy AND clm100.rencnt = uwm100.rencnt AND clm100.endcnt = uwm100.endcnt NO-LOCK: ACCUMULATE clm100.amount (COUNT SUM). END. ACCUMULATE uwm100.amount (COUNT SUM BY uwm100.poltype). subtotal = (ACCUM SUM BY uwm100.poltype uwm100.amount). IF LAST-OF(poltype) THEN DO: CREATE ttSubTotals. ASSIGN ttSubTotals.poltype = uwm100.poltype ttSubTotals.subtotal = subtotal . DISPLAY ttSubTotals. END. END. MESSAGE "Records in uwm100 = " + STRING((ACCUM COUNT uwm100.amount)) SKIP(1) "Records in clm100 = " + STRING((ACCUM COUNT clm100.amount)) SKIP(1) VIEW-AS ALERT-BOX.

Continue reading...
 
Status
Not open for further replies.
Top