Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: calculate summary on abother summary Post Reply Post New Topic
Author Message
techie36
Newbie
Newbie


Joined: 05 Feb 2008
Online Status: Offline
Posts: 4
Quote techie36 Replybullet Topic: calculate summary on abother summary
     Posted: 05 Feb 2008 at 5:34am
hi everyone
 
I performed a summary using the SUM function.
These summaries are grouped by a particular field.
 
I need to identify the maximum of these grouped summaries. So it tried to perform a summary on these grouped summaries, but it's not possible
 
This seem like a simple task, but i've tried and tried again and have had no luck.
 
I am using Crystal Reports 10
 
Any suggestions would be appreciated.
 
thanks
Andy
IP IP Logged
fusion
Groupie
Groupie


Joined: 12 Nov 2007
Location: United States
Online Status: Offline
Posts: 93
Quote fusion Replybullet Posted: 05 Feb 2008 at 2:21pm
creating a summary of the summary is not possible using the built in function. However you can create  a formula which can perform the sum.
IP IP Logged
techie36
Newbie
Newbie


Joined: 05 Feb 2008
Online Status: Offline
Posts: 4
Quote techie36 Replybullet Posted: 06 Feb 2008 at 2:20am
Hi fusion, thanks for your reply
 
Just to clarify, i tried this in the Select Expert.
Last year sales are Summed by Country, Now I need the max of these.
When i tried this in the select expert, it said i couldn't perform the function on a summary.
 
Maximum (Sum ({Customer.Last Year's Sales}, {Customer.Country}))
 
 
Can you clarify, so i should write a maxOfSums function from scratch?
 
thanks
IP IP Logged
Lugh
Senior Member
Senior Member
Avatar

Joined: 14 Nov 2007
Online Status: Offline
Posts: 377
Quote Lugh Replybullet Posted: 06 Feb 2008 at 5:24am
Unfortunately, you can't quite do it that way.

Instead, add a formula to each group footer, that simply returns the SUM for that group.  Then, take the Maximum of that formula in your report footer.

As a note, this doesn't always work.  This is because of the order in which Crystal performs various operations.  One way to help Crystal perform everything in the correct order is to put all your summary calculations in the footers, instead of the headers.


IP IP Logged
techie36
Newbie
Newbie


Joined: 05 Feb 2008
Online Status: Offline
Posts: 4
Quote techie36 Replybullet Posted: 07 Feb 2008 at 1:54am
Thanks for your reply,
 
I will have a go at this.
 
 
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum