Announcements
 Crystal Reports Forum : General Information : Announcements
Message Icon Topic: Distinctcount filtering Post Reply Post New Topic
Author Message
Audleyite
Newbie
Newbie
Avatar

Joined: 25 Apr 2008
Online Status: Offline
Posts: 5
Quote Audleyite Replybullet Topic: Distinctcount filtering
    Posted: 04 Jun 2008 at 4:07am
I've set up a distinct count field to display on the report which works fine, but I want to filter the report to only display where the count is 2 or more.  I can't seem to find how to achieve this using Crystal Reports 10.  Can anyone help please?
SMT
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 10 Jun 2008 at 9:04am
I am not clear as to how you set up the count.
 
If you are doing it in SQL you can change your query to include a 'Having' statement which kind of acts like a 'Where' statement for Group By.
 
You could create a formula or series of formula that checks the count by using an IF statement
 
If 'distinct count' > = 2 then .....
 
If the SQL query is something that will work for your needs it is in my humble opinion the better solution.
 
Hope this is of some help.
 
Regards,
 
John W.
 
IP IP Logged
pandabear
Newbie
Newbie


Joined: 24 Jun 2008
Location: United States
Online Status: Offline
Posts: 3
Quote pandabear Replybullet Posted: 24 Jun 2008 at 11:04am

Go to the section(s) , click on the formula button next to

"Suppress" and enter "distinct field that I created" <= 2.
Repeat for each section you need to hide.
(SQL almost always better :)


Edited by pandabear - 24 Jun 2008 at 11:08am
IP IP Logged
Audleyite
Newbie
Newbie
Avatar

Joined: 25 Apr 2008
Online Status: Offline
Posts: 5
Quote Audleyite Replybullet Posted: 25 Jun 2008 at 8:50am
Thanks very much guys for all your help!  Much appreciated!
SMT
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.031 seconds.