Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Suppressed data Inc in Sums Post Reply Post New Topic
Author Message
adders
Groupie
Groupie


Joined: 09 Aug 2010
Online Status: Offline
Posts: 53
Quote adders Replybullet Topic: Suppressed data Inc in Sums
    Posted: 16 Aug 2013 at 1:24am
Hi,

is it possible to exclude suppressed lines from a sum?

Currently have a running total for the record count, I also have a boolean formula to select true where the count is less than 10, however in the running total I'm unable to select records based on that formula?

Thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Aug 2013 at 3:09am
you cannpot use a RT as a condition on another RT as they evaluate on the same pass.
YOu can use a summary in an RT.
I assume you have a grouping. You are doing a record count in the group and you want to do a count of the groups (or all records in groups) where the original count is > 10.
Try using an insert summary as a COUNT(field,groupname) to get your first number which can be used in the RT as an evaluate condition.
IP IP Logged
adders
Groupie
Groupie


Joined: 09 Aug 2010
Online Status: Offline
Posts: 53
Quote adders Replybullet Posted: 16 Aug 2013 at 4:43am
Thanks for the quick reply!

have managed to do a count based on boolean values, however I know have the other 3 columns to try and bring only the first 10 records out! Is there away just to tell crystal reports to bring the top 10 results of each group rather than suppressing all the data?

If not I guess more formula writing is needed!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Aug 2013 at 5:03am
you can use the a top 10 but not sure how it wouild handle boolean ?
Can you explain or show sample data of what youw ant it to do?
Also remember that suppressed data ius still in the  report and is including in all calculations unless you explicitly exclude it.
IP IP Logged
adders
Groupie
Groupie


Joined: 09 Aug 2010
Online Status: Offline
Posts: 53
Quote adders Replybullet Posted: 19 Aug 2013 at 4:44am
Image of report included, you'll see the three sums I'm currently showing, I only ever wont them to show and use those line that are true.

Thanks


IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Aug 2013 at 8:25am
You can use shared variables to do this
 
you need one to set th valus to 0 in the group header
//header
shared numbervar counter;
shared numbervar amount;
counter := 0;
amount := 0;
 
you need another to do the row level calculation
//details
shared numbervar counter;
shared numbervar amount;
counter := counter + 1;
amount := if counter<11 then amount + {table.field} else amount;
 
then a third to display your final value in the group footer
//Footer
shared numbervar amount;
amount;
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.047 seconds.