cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Crystal Sum of Sub Group Totals

0 Kudos

  • 1)Red boxes are group 2 headers which are weighted average of all the values in detail section (body)
  • 2)I need sum of these three red boxes in place of black box (i.e. group header 1)
  • 3)If I simply insert ‘Total’ and keep it as sum it will sum all the instances of detail section as well, but my requirement is only sum of weighted average in sub group.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Unsuppress the eval formula and see what is being calculated.

OOPs my mistake change @eval to

Global numbervar subtotal:= subtotal+(whatever your summary function is) eg Sum(Nummericfield, Accountnumbergroup field)

Ian

Answers (4)

Answers (4)

Former Member

Use a Variable to add together

You need 3 formula

@Reset place this in groupheader 1 and suppress

Whileprintingrecords;

Global numbervar subtotal:=0

@Eval place this in groupheader 2 and suppress

Whileprintingrecords;

Global numbervar subtotal:= (whatever your summary function is) eg Sum(Nummericfield, Accountnumbergroup field)

@Display place this in groupfooter 1

Whileprintingrecords;

Global numbervar subtotal;

Ian

0 Kudos

Did all these 3 steps still showing incorrect result

0 Kudos

Yes Sir, I did work. Thanks you so much.

former_member292966
Active Contributor
0 Kudos

Hi Naoman,

Are these subtotals summary fields or are they formulas? If they are summmary fields then you can copy that field into Group Header 1. From what you've said this doesn't sound like it's the case.

If they are a formula then you should be looking at using a Running total to calculate the subtotals and having them roll into the total. The problem with running totals is you can't have the total in Group Header 1, it would have to go into the Group Footer 1 because Crystal calculates formulas left-right, top to bottom. It can't calculate a formula and then pass the results to a section above it.

Brian

0 Kudos

Thanks Brian, these are inserted as totals (weighted average)

0 Kudos

Kindly Help