Print Page | Close Window

Summing Group Footer Values

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=6894
Printed Date: 18 May 2024 at 4:22pm


Topic: Summing Group Footer Values
Posted By: bradlee27514
Subject: Summing Group Footer Values
Date Posted: 29 Jun 2009 at 11:05am
I am grouping by customer and then by invoice

GH1 Invoice | Amount
D         1 | $10
GF2     1 | $10
D         2 | $5
D         2 | $5
GF2      2 | $5
GF1   Total | $20

I want to sum the Amount in the GF2 field for the whole group.  However when I do I get $20, when I should get $15.  How can I make this sum work?

I tried creating a new formula to create data that would take into account repeat instances:
if
  {#count of items on invoice} > 1
then
  {@amount sum} / {#count of items on invoice}
else
  {@amount sum}
 
However when I tried to sum this field I got an error message that the field could not be summarized. 

I know there is a distinct count, but there is no distinct sum.  I want to sum the values for GF2 not for all of the detail rows. 



Replies:
Posted By: DBlank
Date Posted: 29 Jun 2009 at 1:45pm
Use a RT as a SUM but set the evaluate for section to once per group (group2) and reset at GROUP1 palced on GF1.


Posted By: bradlee27514
Date Posted: 29 Jun 2009 at 1:54pm
Thank you so much!  



Print Page | Close Window