syarbrough
IS-IT--Management
I am trying to create a summary of a field that has a calculation on it. The problem is; as soon as I add the Formula Field to the Report, the report does not show one (the last?) record, which is a problem. Here are the formulas that I am trying to use:
WhilePrintingRecords;
CurrencyVar Runtotal;
if {PayrollWorkersComp.JobClassID} = "8810" then Runtotal:= Runtotal + {PayrollWorkersComp.CompanyAmount} * 0.85287356321839080459770114942529
else
if {PayrollWorkersComp.JobClassID} = "8742" then Runtotal:= Runtotal + {PayrollWorkersComp.CompanyAmount} * 0.76814516129032258064516129032258
else
if {PayrollWorkersComp.JobClassID} = "8393" then Runtotal:= Runtotal + {PayrollWorkersComp.CompanyAmount} * 0.50345423143350604490500863557858
else
if {PayrollWorkersComp.JobClassID} = "8380" then Runtotal:= Runtotal + {PayrollWorkersComp.CompanyAmount} * 0.42869269949066213921901528013582
else
0
or simply:
sum ({@WC})
I am new to CR, so be gentle.
Cheers,
Stan
WhilePrintingRecords;
CurrencyVar Runtotal;
if {PayrollWorkersComp.JobClassID} = "8810" then Runtotal:= Runtotal + {PayrollWorkersComp.CompanyAmount} * 0.85287356321839080459770114942529
else
if {PayrollWorkersComp.JobClassID} = "8742" then Runtotal:= Runtotal + {PayrollWorkersComp.CompanyAmount} * 0.76814516129032258064516129032258
else
if {PayrollWorkersComp.JobClassID} = "8393" then Runtotal:= Runtotal + {PayrollWorkersComp.CompanyAmount} * 0.50345423143350604490500863557858
else
if {PayrollWorkersComp.JobClassID} = "8380" then Runtotal:= Runtotal + {PayrollWorkersComp.CompanyAmount} * 0.42869269949066213921901528013582
else
0
or simply:
sum ({@WC})
I am new to CR, so be gentle.
Cheers,
Stan