We help IT Professionals succeed at work.
Get Started

Totals for a Special group deduction in Crystal Reports

csenor asked
Last Modified: 2014-05-21
I am having problems with a total in Crystal Reports. I have a report that has 2 Groups. I need to make a specific deduction for each group that is not related to the detail records. I have created that special deduction with the following formula:

if {Database.ItemClass} = "Group A" then 2000 else
if {Database.ItemClass} = "Group B" then 3000 else 0  

That works fine until I go to get a Grand Total of Groups A & B for the special deduction field. There is not a problem with other fields because they exist in the detail, but with this special field the amounts exist at the Group Level only.

I would appreciate any help. I certainly think that Crystal Reports would be able to keep a total for these "special' amounts, but I can not find the solution in my manuals.  

Here is the format of my report:

                  Item Name      Qty            Expense            Special Deduction
      detail            Item A1            10            3,000      
      detail            Item A2            10            3,000
      detail            Item A3            10            3,000      
Group       Group A Totals            30            9,000            2,000
      detail            Item B1            20            6,000      
      detail            Item B2            20            6,000      
Group      Group B Totals                    40            12,000            3,000
Watch Question
Senior Consultant
Most Valuable Expert 2011
Top Expert 2013
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE