We help IT Professionals succeed at work.

Shared Variable NumberVar not totaling in Footer

pmasseycpa asked
Medium Priority
Last Modified: 2012-06-27
I have the following setup in a Crystal Report v.10:

Group Header --  Feld Name: VacTotalH
shared numberVar VacTotal :=0;

Detail Section --  Field Name: VacAccrualManual
shared numberVar VacTotal;
VacTotal:= {@VacAccrualMonthly};

Group Footer -- Field Name: VacAccrualTotal
shared numberVar VacTotal;

The Group Header is fine.  The details section works fine.  The group footer is not totaling the values in the Details section.  I get the following:

Group Header field = 0

Group Details Record instance 1 = 10.17
Group Details Record instance 2 = 12.13

Group Footer field = 12.13  (This should be 22.30 - a total of 10.17 and 12.13)

HELP!!!  The need for this is extremely urgent and I have set it to 500 points.  I'm sure it will be pretty easy, but I need it bad!!
Watch Question

Top Expert 2004
Your VacAccrualManual formula should be this:

Detail Section --  Field Name: VacAccrualManual
shared numberVar VacTotal;
VacTotal:= VacTotal+{@VacAccrualMonthly};

You were resetting the formula each time rather than accumulating it.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Looks like the answer.

Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.