Show formula in Page Header based on total in Group Footer

MISSSB used Ask the Experts™
I am trying to create a Crystal Report where a formula in the Page Header is determined by the whether or not the total in the group footer is less than or greater than zero.

 How can I get this done?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

What formula is used for the group footer total?

Off the top of my head I can't think of a way to do this.

Is each group on a single page?



My report has three groups.

In group footer 3 I have a formula called CalcAmt with this content:
if {v_payment_info.fund_code}="LV" then  {cn_c3_reported.emp_levy_amt_calc} + {cn_c3_reported.emp_levy_penalty_amt}
else if {v_payment_info.fund_code}="SS" then {cn_c3_reported.emp_ss_amt_calc} + {cn_c3_reported.emp_ss_fines_due}
else if {v_payment_info.fund_code}="PE" then {cn_c3_reported.emp_pe_amt_calc} + {cn_c3_reported.emp_pe_penalty_amt}

Also in that group footer I have another formula called Pay_Diff with the following:
{@CalcAmt}-Sum ({v_payment_info.payment_amount}, {v_payment_info.fund_code})

In group footer 1, I have a formula called BalTotal that  does the the following:
Numbervar dSum;   //Don't initialize zero

In the header I want to suppress a text box if the BalTotal formula returns 0
Senior Consultant
Most Valuable Expert 2011
Top Expert 2013
The test of BalTotal you definitely can't do.  It is calculated when the report prints so the page header has been printed well before you calculate the value.

You could do it in a subreport if you made one that could calculate the values and not display anything

Where is the dSum variable set, and what's in it?  The other 2 formulas that you posted don't mention it (in fact, they don't seem to have anything to do with your question).

 You might be able to suppress something in the page header based on a total for the first group 1 on the page, but whether or not that helps you will depend on what's in dSum.  If it's something that you can duplicate with a simple summary, then you could check that summary.


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial