Avatar of qbjgqbjg
qbjgqbjg
Flag for United States of America asked on

I have formulas that are not working to accum grand totals

I have this Formula for Yearly Totals

Shared NumberVar yearlyWages;
Shared NumberVar GrandWages;
GrandWages := GrandWages + yearlyWages;
yearlyWages;
It is placed in Group2 footer(there is nothing in Group1 footer)
In the report footer I have this formula for Grand Total
Global NumberVar GrandWages;
GrandWages

Yearly wages works fine.. it is being reset to 0 in Group header 2.
The GrandWages in the report footer is 0.  It does not have the accumulated value.
What am I doing wrong?
Crystal Reports

Avatar of undefined
Last Comment
Mike McCracken

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Mike McCracken

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
qbjgqbjg

ASKER
Thanks, I will try that.
qbjgqbjg

ASKER
That worked for mostmof the totals in my grand total line except for 1 that is a little more complicated. I have this formula in Group2 Footer
Shared NumberVar yearlyWages;
Shared NumberVar MatchAllowed;
Shared NumberVar GrandAllowed;
Shared NumberVar Yearly401K;
Shared NumberVar Yearly401KM;
If (yearlyWages * .10) <= Yearly401K then
MatchAllowed := (yearlyWages * .10) * .10
else
MatchAllowed := Yearly401K * .10;
GrandAllowed := MatchAllowed;
MatchAllowed

and this one in Report Footer

Shared NumberVar GrandAllowed;

GrandAllowed

It is only getting the previous total.
MatchAllowed is not being cleared anywhere. It is working fine, just not accumulating in GrandAllowed.
qbjgqbjg

ASKER
Never mind, I think I see it.
Your help has saved me hundreds of hours of internet surfing.
fblack61
qbjgqbjg

ASKER
How do I submit it. I selected your answer as best answer.
Mike McCracken

Just click the BEST SOLUTION box in the comment