Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Suppress if all the same Post Reply Post New Topic
Author Message
carstowal
Groupie
Groupie


Joined: 31 Jul 2008
Online Status: Offline
Posts: 80
Quote carstowal Replybullet Topic: Suppress if all the same
     Posted: 09 Mar 2010 at 8:07am
I have a report of Shipments Made to a Customer.  Generally, all shipments go to the same location, however, if not, I would like to display the Address.City for the Details

If it is the same for every detail in the report, I would like to suppress it on every occasion.

Only display the Address.City if they are not all the same.


Edited by carstowal - 09 Mar 2010 at 8:08am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Mar 2010 at 6:17pm
I am not exactly sure what you want to here...
You can use the suppress if duplicated or you can do a distinctcount on the address field (set on the customer group footer) if it =1 then they are all the same and you can use that condition as a suppress process.
If you need more please give some samples of what you want to do.
 
NOTE: If you have empty strings instead of NULLS for the rows with no address it will include the "" rows as 1 distinct record.


Edited by DBlank - 09 Mar 2010 at 6:23pm
IP IP Logged
carstowal
Groupie
Groupie


Joined: 31 Jul 2008
Online Status: Offline
Posts: 80
Quote carstowal Replybullet Posted: 16 Mar 2010 at 3:39am

My groups are by Customer, not Cities

 
there are 7 rows of details in Group1 Customer ABC:
3 are Chicago
2 are Miami
2 are New York.
 

Distinct count of Address.City, for each record, on change of group#1
RTCities = 3, placed in the GF1

 
Conditionally suppressing Address.City Field in Details, RTCities = 1
Results:
The city name Chicago is supressed (as it's distinct count = 1)
The city name Miami is Visible (as it's distinct count = 2)
The city name New York is Visible (as it's distinct count = 3)
 

However, in this case I want ALL city names visible.

 
The only time I want all city names suppressed is when all 7 are the same city.
It's a suppress all addess.city or none, never just some.
If Maximum(RTCities = 1) would work, that is what I'm after!


Edited by carstowal - 16 Mar 2010 at 3:41am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Mar 2010 at 4:42am

Suppress ion the DisticntCOunt of the City at the Customer Group Level

in  you section Expert in the Detail section the conditional suppress will be something like:
DISTINCTCOUNT(table.address,table.customer)>1
 
 
EDIT: DISTINCTCOUNT(table.address,table.customer)=1


Edited by DBlank - 16 Mar 2010 at 5:18am
IP IP Logged
carstowal
Groupie
Groupie


Joined: 31 Jul 2008
Online Status: Offline
Posts: 80
Quote carstowal Replybullet Posted: 17 Mar 2010 at 5:58am
THANK YOU  - SOLVED
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