Show formula in Page Header based on total in Group Footer

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?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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?

MISSSBAuthor Commented:
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
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


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.