sorchard2000
Technical User
My original problem was:
I am finishing up a Crystal 8.5 report and have a formula called @TotalPtCharge (see following) that show currency charge for a patient bill. This formula resides in a group footer on the main report.
{@MainFormula}+{@MainFormula2}+Sum ({@editedChargeAmt}, {casemain.pat_acct_num})
@MainFormula and @MainFormula2 are references to formulas that are coming off of 2 different subreports.
I need to do a grand total of this formula for all patients listed. But whenever I try to do a Insert>Grand Total OR Insert>Summary OR a running total, the formula is not listed (recognized) as a field. I'm not sure what to do at this point--another formula?
********
So I followed bdreed35's advice (which worked successfully) and changed my formulas to:
bdreed35 (Programmer)
You are going to need to manually accumuate the patients totals.
Modify your Group Footer formula to this:
CODE
whileprintingrecords;
local currencyvar patient_total := {@MainFormula}+{@MainFormula2}+Sum ({@editedChargeAmt}, {casemain.pat_acct_num});
currencyvar grand_total := grand_total + patient_total;
patient_total
Create a new formula to display the grand_total variable:
CODE
whileprintingrecords;
currencyvar grand_total;
Place the formula in your report footer.
**********
I used his code to make subtotal for each patient (each group).
So now I need to make a final, grand total field in the footer which reflects all the subtotals for the entire report. But everything that I have tried so far has failed.
Any ideas?
Thanks in advance!
I am finishing up a Crystal 8.5 report and have a formula called @TotalPtCharge (see following) that show currency charge for a patient bill. This formula resides in a group footer on the main report.
{@MainFormula}+{@MainFormula2}+Sum ({@editedChargeAmt}, {casemain.pat_acct_num})
@MainFormula and @MainFormula2 are references to formulas that are coming off of 2 different subreports.
I need to do a grand total of this formula for all patients listed. But whenever I try to do a Insert>Grand Total OR Insert>Summary OR a running total, the formula is not listed (recognized) as a field. I'm not sure what to do at this point--another formula?
********
So I followed bdreed35's advice (which worked successfully) and changed my formulas to:
bdreed35 (Programmer)
You are going to need to manually accumuate the patients totals.
Modify your Group Footer formula to this:
CODE
whileprintingrecords;
local currencyvar patient_total := {@MainFormula}+{@MainFormula2}+Sum ({@editedChargeAmt}, {casemain.pat_acct_num});
currencyvar grand_total := grand_total + patient_total;
patient_total
Create a new formula to display the grand_total variable:
CODE
whileprintingrecords;
currencyvar grand_total;
Place the formula in your report footer.
**********
I used his code to make subtotal for each patient (each group).
So now I need to make a final, grand total field in the footer which reflects all the subtotals for the entire report. But everything that I have tried so far has failed.
Any ideas?
Thanks in advance!