Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get sum of groups in crystal report 10?

I have a report with for some invoices and each invoice has some lines like this :

invoice1 2000
     line1   300
     line2   700
     line3   500
     line4   500
invoice2 1000
     line1   300
     line2   400
     line3   300

Now, when I use summary for group#1, I should get 3000 as sum of group amount. but it shows me 11000 (4X2000)+(3X1000) because it sums invoice lines!
what should I do?

like image 258
LIX Avatar asked Dec 08 '10 13:12

LIX


People also ask

How do I display top 10 records in Crystal Reports?

Right click on the report layout > Reports > Top N/Sort Group Expert > Choose Top N in the Dropdown that asks for the type of filtering/ sorting you wish to do > Set the Value of top N (5 in your case) > Uncheck the option that includes other records.


1 Answers

You should have running total that is placed into your 'Group Footer #1'

If you right-click and select 'Edit Running Total' you should have the following:

  • Field to summarize should be your value you wish to sum. I guess this is correct!
  • Type of summary - should be sum
  • Evaluate - 'For each record' should be selected.
  • Reset - 'On change of group' should be selected and Group #1 should be chosen.

Update In this case if the summary data appears in the source data and you a total for the whole reports change the running total to only evalute for each invoice (Group #1) and don't Reset.

Note: Assuming Group #1 is on Invoice Number and the summary required is for the whole report

So the steps will now be:

  • Field to summarize should be your value you wish to sum. I guess this is correct!
  • Type of summary - should be sum
  • Evaluate - 'On chnge of group' should be selected.
  • Reset - 'Never' should be selected and Group #1 should be chosen.
like image 135
Dog Ears Avatar answered Oct 13 '22 18:10

Dog Ears