Link to home
Start Free TrialLog in
Avatar of qbjgqbjg
qbjgqbjgFlag 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?
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of qbjgqbjg

ASKER

Thanks, I will try that.
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.
Never mind, I think I see it.
How do I submit it. I selected your answer as best answer.
Avatar of Mike McCracken
Mike McCracken

Just click the BEST SOLUTION box in the comment