Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Sum of a Max? Post Reply Post New Topic
Author Message
kgbo
Newbie
Newbie


Joined: 26 Jun 2013
Online Status: Offline
Posts: 30
Quote kgbo Replybullet Topic: Sum of a Max?
     Posted: 31 Jul 2013 at 10:41am
How would you take the sum of a max? In other words, how do you get a sum of a sum?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Jul 2013 at 11:57am
shared variables
IP IP Logged
kgbo
Newbie
Newbie


Joined: 26 Jun 2013
Online Status: Offline
Posts: 30
Quote kgbo Replybullet Posted: 01 Aug 2013 at 3:04am
Could you expand?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 01 Aug 2013 at 3:46am
3 formulas using shared numbervar x
//one to set the value to 0 in the report header
whileprintingrecords;
shared numbervar x;
x := 0;
//1 to add the max values in the group footer
whileprintingrecords;
shared numbervar x;
x := x + Maximum(field,group);
//1 to dispaly the final result in the report footer
whileprintingrecords;
shared numbervar x;
x
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