Skip to Content
0

SAP Crystal Sum of Sub Group Totals

Feb 07, 2017 at 08:41 PM

49

avatar image

  • 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.
group-sum-issue.png (105.6 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

5 Answers

Best Answer
Ian Waterman Feb 08, 2017 at 11:41 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Ian Waterman Feb 08, 2017 at 09:40 AM
1

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Did all these 3 steps still showing incorrect result

0
Brian Dong Feb 07, 2017 at 09:11 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0
Naoman daulatabad Feb 07, 2017 at 08:52 PM
0

Kindly Help

Share
10 |10000 characters needed characters left characters exceeded
Naoman daulatabad Feb 08, 2017 at 01:27 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded