lauriesamh
Technical User
I'm trying to sum charges for claims.
Each claim is assigned a type based on a formula (@ClaimType). I have accumulated the number of claims (thanks to Tek Tips earlier) via a count,accumulation and display (for a faux cross tab) formulas see below. How can I do this for charges where there is a field of total charges (currency field)per claim id?
@TypeCounter
If Maximum ({@ClaimType}, {Claims.ClaimID}) = "0" then 0 else
If Maximum ({@ClaimType}, {Claims.ClaimID}) = "1" then 1 else
If Maximum ({@ClaimType}, {Claims.ClaimID}) = "2" then 2 else
If Maximum ({@ClaimType}, {Claims.ClaimID}) = "3" then 3 else
If Maximum ({@ClaimType}, {Claims.ClaimID}) = "4" then 4
-----------------------------------
@Accum
whileprintingrecords;
numbervar x0;
numbervar x1;
numbervar x2;
numbervar x3;
numbervar x4;
if {@TypeCounter} = 0 then x0 := x0 + 1;
if {@TypeCounter} = 1 then x1 := x1 + 1;
if {@TypeCounter} = 2 then x2 := x2 + 1;
if {@TypeCounter} = 3 then x3 := x3 + 1;
if {@TypeCounter} = 4 then x4 := x4 + 1;
@DisplayOffice
whileprintingrecords;
numbervar x1;
replicatestring(" ", 8 - len(totext(x1))) + totext(x1,0,"") + chr(13)
Each claim is assigned a type based on a formula (@ClaimType). I have accumulated the number of claims (thanks to Tek Tips earlier) via a count,accumulation and display (for a faux cross tab) formulas see below. How can I do this for charges where there is a field of total charges (currency field)per claim id?
@TypeCounter
If Maximum ({@ClaimType}, {Claims.ClaimID}) = "0" then 0 else
If Maximum ({@ClaimType}, {Claims.ClaimID}) = "1" then 1 else
If Maximum ({@ClaimType}, {Claims.ClaimID}) = "2" then 2 else
If Maximum ({@ClaimType}, {Claims.ClaimID}) = "3" then 3 else
If Maximum ({@ClaimType}, {Claims.ClaimID}) = "4" then 4
-----------------------------------
@Accum
whileprintingrecords;
numbervar x0;
numbervar x1;
numbervar x2;
numbervar x3;
numbervar x4;
if {@TypeCounter} = 0 then x0 := x0 + 1;
if {@TypeCounter} = 1 then x1 := x1 + 1;
if {@TypeCounter} = 2 then x2 := x2 + 1;
if {@TypeCounter} = 3 then x3 := x3 + 1;
if {@TypeCounter} = 4 then x4 := x4 + 1;
@DisplayOffice
whileprintingrecords;
numbervar x1;
replicatestring(" ", 8 - len(totext(x1))) + totext(x1,0,"") + chr(13)