I have a report for pay slips that I have to remove some paycode and add them to a different paycode to simplify the look of the report and cut down on duplicate information.
I have the following formula to do this;
if {CPY30161.PIncomeCode}="ST DIS" then
({CPY30161.PLineTotal}+Sum ({@STDIS2}))*-1 else
if {CPY30161.PIncomeCode}="STDIS2" then
0.00 else
if {CPY30161.PIncomeCode}="LT DIS" then
({CPY30161.PLineTotal}+Sum ({@LTDIS2}))*-1 else
if {CPY30161.PIncomeCode}="LTDIS2" then
0.00 else
if {CPY30161.PPayrollCodeType}=3 then {CPY30161.PLineTotal}*(-1)
else {CPY30161.PLineTotal}
This all works fine on the report, the problem is that I need a total of this field, which works except that it does not add the "+Sum ({@LTDIS2})" part of the code to the total.
I am at a complete loss as to why it totals everything except that one part of the formula?
Can someone please point me in the right direction?
I have the following formula to do this;
if {CPY30161.PIncomeCode}="ST DIS" then
({CPY30161.PLineTotal}+Sum ({@STDIS2}))*-1 else
if {CPY30161.PIncomeCode}="STDIS2" then
0.00 else
if {CPY30161.PIncomeCode}="LT DIS" then
({CPY30161.PLineTotal}+Sum ({@LTDIS2}))*-1 else
if {CPY30161.PIncomeCode}="LTDIS2" then
0.00 else
if {CPY30161.PPayrollCodeType}=3 then {CPY30161.PLineTotal}*(-1)
else {CPY30161.PLineTotal}
This all works fine on the report, the problem is that I need a total of this field, which works except that it does not add the "+Sum ({@LTDIS2})" part of the code to the total.
I am at a complete loss as to why it totals everything except that one part of the formula?
Can someone please point me in the right direction?