Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Sum of first 2 data field in Group selection Post Reply Post New Topic
Author Message
johnsp1234
Newbie
Newbie
Avatar

Joined: 18 Feb 2011
Online Status: Offline
Posts: 2
Quote johnsp1234 Replybullet Topic: Sum of first 2 data field in Group selection
     Posted: 04 Mar 2011 at 3:02pm
Im am trying to add a condition to show data thru group selection by means of a sum formula of only the first 2 data fields :
 if the sum of the first 2 data fields = 0
 
is there any functionality within Crystal that can be applied to accomplish this ?
 
 


Edited by johnsp1234 - 04 Mar 2011 at 3:03pm
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Mar 2011 at 3:40am
Do you mean the first to rows of data within each group?
If so, then no you cannot use that in a group select statement.
You could possibly use subreports to pass a shared variable and use it for suppression but not exclusion.
IP IP Logged
krish
Newbie
Newbie


Joined: 04 Aug 2011
Location: United Kingdom
Online Status: Offline
Posts: 6
Quote krish Replybullet Posted: 11 Aug 2011 at 3:27am
Hi!

example :
sum({fieldname},{group fieldname})+sum({fieldname},{groupfieldname})=0

hope this works!!!!!!!:)




IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 11 Aug 2011 at 3:35am
As DBlank is asking...
Are you meaning to suppress a group based on sum of the first 2 rows... I agree there is no functionality, subreport would work with the shared variable.
 
if you mean to suppress based on 2 columns in the same row, that is doable.
such as {table.field1} + {table.field2} = 0 would suppress
 
so it really comes down to, what does 'the first 2 data fields' mean.
 
unfortunately, as displayed krish's solution won't work as it is summing for the entire group, twice, so I doubt it would be zero...and it is not using the first 2 data fields
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