Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1132
  • Last Modified:

Sum of a summarized field in Crystal Report 11

Hi,
I'm new to Crystal reports and I am trying to get a total sum of a number of sums.
So far I have
Counterparty:  ID A
                               {start time} {end time} {Quantity1] //this breakdown of detail is hidden in the subreport
                                {start time} {end time} {Quantity2} //this breakdown of detail is hidden in the subreport
                                {start time} {end time} {Quantity3} //this breakdown of detail is hidden in the subreport
                                                                   Sum(Quantity)
                        ID B  
                                {start time} {end time} {Quantity1} //this breakdown of detail is hidden in the subreport
                                {start time} {end time} {Quantity2} //this breakdown of detail is hidden in the subreport
                                {start time} {end time} {Quantity3}  //this breakdown of detail is hidden in the subreport
                                                                   Sum(Quantity)
I then need to have a Sum(SumQuntity).  Which is where I am having problems as when I try this crystal brings up an error saying that I can't summarize a summary.

Can this be done?
Any Help?
Thank you.
0
aditi55
Asked:
aditi55
  • 2
1 Solution
 
mlmccCommented:
Yes but you have to use variables and formulas

How do you calculate the Sum(Quantity)

You need a formula like this in the group footer
Global NumberVar ReportTotal;
ReportTotal := ReportTotal + {Sum(Quantity) formula};

Display in the report footer with
Global NumberVar ReportTotal;
ReportTotal

mlmcc
0
 
aditi55Author Commented:
I have calculated Sum(Quantity)  by creating a formula field which includes sum({@Quantity}) as the formula.

I have tried the formula suggested but I just get a value of 0.  
What I would like to see is:                            
Counterparty:  ID A    Sum(Quantity)
                        ID B    Sum(Quantity)
                        ID C    Sum(Quantity)
                                   TotalQuantity.
But what I see is:
Counterparty:  ID A   Sum(Quantity)
                                  TotalQuantity = 0
                        ID B    Sum(Quantity)
                                   TotalQuantity = 0
                        ID C    Sum(Quantity)
                                   TotalQuantity = 0
I don't quite understand where I am going wrong.
       
0
 
mlmccCommented:
Add WhilePrintingRecords as the first line of the formula

Put the display in the report footer not the group footer.

mlmcc
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now