Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: suppress results from reporting Post Reply Post New Topic
Author Message
Paula J
Groupie
Groupie
Avatar

Joined: 22 Aug 2011
Location: United States
Online Status: Offline
Posts: 51
Quote Paula J Replybullet Topic: suppress results from reporting
     Posted: 14 Sep 2011 at 6:48am
I have a report that unless the id# is duplicated I do not want the results on the report.
 
FYI:  The ID# is a number that is assigned to the person and the acct # is assigned to the id# each time an acct is opened and the Svc Date will be the same date for each line item. 
Below is now my report looks now
ID#       Svc Date     Acct#     Per Name
1111      9/13/11     20011    Joe Smith
1111      9/13/11     20015    Joe Smith
2222      9/13/11     20017    Bob Jones
2233      9/13/11     20111    Jim Black
2233      9/13/11     20119    Jim Black
This is how I want my report to look
ID#       Svc Date     Acct#     Per Name
1111      9/13/11     20011    Joe Smith
1111      9/13/11     20015    Joe Smith
2233      9/13/11     20111    Jim Black
2233      9/13/11     20119    Jim Black
 
Paula J
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Sep 2011 at 7:31am

a few ways to do this

one would be to group on ID# and do a count of ID at the group level then in the select expert expert group selection use
Count(table.ID, table.ID)>1
supress the GH and GF
IP IP Logged
Paula J
Groupie
Groupie
Avatar

Joined: 22 Aug 2011
Location: United States
Online Status: Offline
Posts: 51
Quote Paula J Replybullet Posted: 19 Sep 2011 at 10:14am

This is not working for me...

Paula J
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Sep 2011 at 10:32am
group on the ID#
use insert summary as a Count of ID# reset at group level 1 (ID#)
this will put a field in the Group footer that should show the count of records per group.
Does this work and give you the correct number (sample below)?
 
GH     1111
detail 1111      9/13/11     20011    Joe Smith
detail 1111      9/13/11     20015    Joe Smith
GF     2
 
GH     2222
detail 2222      9/13/11     20017    Bob Jones
GF     1
 
GH     2233
detail 2233      9/13/11     20111    Jim Black
detail 2233      9/13/11     20119    Jim Black
GF     2
 
IP IP Logged
Paula J
Groupie
Groupie
Avatar

Joined: 22 Aug 2011
Location: United States
Online Status: Offline
Posts: 51
Quote Paula J Replybullet Posted: 19 Sep 2011 at 11:00am

Yes, I get the correct numbers.

Not clear on where to add the Count(table.ID,table.id)>1
Paula J
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Sep 2011 at 11:06am

Click once on the summary field in the GF to select it

click on the record selection
it should open up with a tab showing "Count of table.ID"
change the "is any value" to "is greater than" and add the value 1.
Hit OK.
Or if you open the select expert
click on the Show formula
there is radio button to choose between 'Record selection' or 'Group selection'
make it group selection
in the formula editor add your group select critera on the summary data you created.
Count(table.ID,table.id)>1


Edited by DBlank - 19 Sep 2011 at 11:08am
IP IP Logged
Paula J
Groupie
Groupie
Avatar

Joined: 22 Aug 2011
Location: United States
Online Status: Offline
Posts: 51
Quote Paula J Replybullet Posted: 20 Sep 2011 at 3:06am

Thank you, this worked but now a different problem.

I also see now that I have accounts falling with 2 and the account number is the same....

ID#     Svc Date     Acct #     Per Name
9999    9/13/11     20220     Tom White
2
 
The above example is showing because the account number (before grouping) lists on the report two times and in this case it should but I still do not want it on the report.
 
Any help on removing this scenario would be appreciated.
 
Paula J
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Sep 2011 at 3:51am
so you only want to show a group (ID#) when the distictcount of the account# for that group is >1?
change your group select criteria to use that for the filter...
 
DistinctCount ({table.acct#}, {table.id#}) > 1
IP IP Logged
Paula J
Groupie
Groupie
Avatar

Joined: 22 Aug 2011
Location: United States
Online Status: Offline
Posts: 51
Quote Paula J Replybullet Posted: 20 Sep 2011 at 4:37am
Thanks....this worked just great!
Paula J
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