I am using CR XI and trying to display a total in the GP2 group footer, but it is adding the last record's value again before it displays.
GP 1 - ChargeDate (Month)
GP 2 - ChargeDate (Day)
GP 3 - Charge
GP 4 - Charge Modifier
//Charge total formula
whileprintingrecords;
shared numbervar Total_Chg_Per_Code;
Total_Chg_Per_Code := QTY * Fee;
//Daily total formula
WhilePrintingRecords;
EvaluateAfter ({@Total Chg per Code});
shared numbervar Total_Chg_Per_Day;
shared numbervar Total_Chg_Per_Code;
Total_Chg_Per_Day := Total_Chg_Per_Day + Total_Chg_Per_Code;
Both formulas are in the details section, and the total is correct until I try to display it in the GP2 footer section. Then, for example, if the last charge amount is 400, it adds 400 to the total again and displays that amount.
//Display formula in GP2 footer
whileprintingrecords;
shared numbervar Total_Chg_Per_Day;
I have Total_Chg_Per_Day reset in GP2 header and Total_Chg_Per_Code reset in GP4 header. Any help is appreciated because I have looked at this a while now and can't figure out why this is happening. Thanks in advance!!
GP 1 - ChargeDate (Month)
GP 2 - ChargeDate (Day)
GP 3 - Charge
GP 4 - Charge Modifier
//Charge total formula
whileprintingrecords;
shared numbervar Total_Chg_Per_Code;
Total_Chg_Per_Code := QTY * Fee;
//Daily total formula
WhilePrintingRecords;
EvaluateAfter ({@Total Chg per Code});
shared numbervar Total_Chg_Per_Day;
shared numbervar Total_Chg_Per_Code;
Total_Chg_Per_Day := Total_Chg_Per_Day + Total_Chg_Per_Code;
Both formulas are in the details section, and the total is correct until I try to display it in the GP2 footer section. Then, for example, if the last charge amount is 400, it adds 400 to the total again and displays that amount.
//Display formula in GP2 footer
whileprintingrecords;
shared numbervar Total_Chg_Per_Day;
I have Total_Chg_Per_Day reset in GP2 header and Total_Chg_Per_Code reset in GP4 header. Any help is appreciated because I have looked at this a while now and can't figure out why this is happening. Thanks in advance!!