Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Suppression Problem - format fields Post Reply Post New Topic
Author Message
tjbarr
Newbie
Newbie


Joined: 01 Nov 2012
Online Status: Offline
Posts: 6
Quote tjbarr Replybullet Topic: Suppression Problem - format fields
     Posted: 02 Nov 2012 at 3:42am
Example:
   Have a database of hobbies and only want to show the crystal report field if the hobby is equal to golf.

Works fine unless the individual has more than 1 hobby.

id1 Golf
id1 Bowling
id2 Golf

Suppression:
{ATTRIBUTE_FULL.ATTRTYPE} <> 'Golf' 

So ID1 field is suppressed but ID2 is not because there are 2 records for that ID and 1 is <> 'Golf'




Edited by tjbarr - 02 Nov 2012 at 3:57am
IP IP Logged
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 02 Nov 2012 at 5:02am
not(like '%golf%')

as opposed to <>
IP IP Logged
tjbarr
Newbie
Newbie


Joined: 01 Nov 2012
Online Status: Offline
Posts: 6
Quote tjbarr Replybullet Posted: 02 Nov 2012 at 6:13am
Thanks but that didn't do it.
IP IP Logged
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 02 Nov 2012 at 6:28am
So why don't we try another method and you say what you want to see. It sounds like you may have your suppression in the group footer or header and not in the details section, but I think details would be the preferred area if what you want to see is listed on the bottom.

id1 Golfing
id1 Bowling
id1 Surfing
id2 Bowling
id3 Bowling
id3 Surfing
id3 Golfing


Which Data above do you want output in the report.

id1 Golfing
id3 Golfing


Edited by comatt1 - 02 Nov 2012 at 6:30am
IP IP Logged
tjbarr
Newbie
Newbie


Joined: 01 Nov 2012
Online Status: Offline
Posts: 6
Quote tjbarr Replybullet Posted: 02 Nov 2012 at 7:51am
Yes that's correct suppress id2
IP IP Logged
tjbarr
Newbie
Newbie


Joined: 01 Nov 2012
Online Status: Offline
Posts: 6
Quote tjbarr Replybullet Posted: 02 Nov 2012 at 7:53am
Yes I have it in the group header.
IP IP Logged
tjbarr
Newbie
Newbie


Joined: 01 Nov 2012
Online Status: Offline
Posts: 6
Quote tjbarr Replybullet Posted: 09 Nov 2012 at 8:01am
What if I tried a subselect?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Nov 2012 at 11:44am
YOu can group on ID
set a formula to flag the groups that have a record of golf
if field like '%golf%' then 1
sum this at the group footer
sum(@flag,id)
any group >0 canbe removed in the group select or suppressed using
sum(@flag,id)>0
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