Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Suppress fields based on conditional formatting Post Reply Post New Topic
Author Message
hckynut
Newbie
Newbie


Joined: 19 Nov 2009
Location: United States
Online Status: Offline
Posts: 3
Quote hckynut Replybullet Topic: Suppress fields based on conditional formatting
     Posted: 19 Nov 2009 at 2:51pm
Is there a way to suppress a row of data based on the conditional formatting in a field?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Nov 2009 at 2:55pm

Likely. Your conditional formatting is based on some formula. Just use that formula in the section expert to suppress rows as well.

So instead of saying "suppress if the field color = red" , there is formula saying when to make the field color red (like...if amount<100 then crRed else crBlack).
therefore you could suppress using that same formula (e.g. amount<100) which is basically the same thing.


Edited by DBlank - 19 Nov 2009 at 2:56pm
IP IP Logged
hckynut
Newbie
Newbie


Joined: 19 Nov 2009
Location: United States
Online Status: Offline
Posts: 3
Quote hckynut Replybullet Posted: 20 Nov 2009 at 9:09am
Thanks DBlank... I've tried that with no success... Keep getting a "result must be boolean" message... Here is what I've got:
 
SUPPRESSED FIELD:
not ({Services.Service}like Previous({Services.Service}) or {Services.Service} like Next ({Services.Service}))
 
CONDITIONAL FIELD FORMATTING:
1) if not ({Services.Affiliate}like Previous({Services.Affiliate}) or {Services.Affiliate}like Next({Services.Affiliate})) then crBold else crRegular
2) if not ({Services.Affiliate}like Previous({Services.Affiliate}) or {Services.Affiliate}like Next({Services.Affiliate})) then crRed else crBlack
3) if not ({Services.Affiliate}like Previous({Services.Affiliate}) or {Services.Affiliate}like Next({Services.Affiliate})) then crYellow else crNoColor
 
I want to SUPPRESS any entries that are NOT conditionally formatted.  Any ideas?


Edited by hckynut - 20 Nov 2009 at 9:10am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Nov 2009 at 10:07am
You want to show it for the first and last time it appears sequentially.
Assuming you get teh conditional suppression down then the rest of it is not needed becuse that is all that is left so you can just make it Red Bold with a yellow background (i think that is what you want).
Right click on the field
select format field
select Common tab
click on the formula box next to the Suppress option and use
{Services.Affiliate}= Previous({Services.Affiliate}) and {Services.Affiliate}=Next({Services.Affiliate})
 
 


Edited by DBlank - 20 Nov 2009 at 10:07am
IP IP Logged
hckynut
Newbie
Newbie


Joined: 19 Nov 2009
Location: United States
Online Status: Offline
Posts: 3
Quote hckynut Replybullet Posted: 23 Nov 2009 at 7:21am
Thanks Smile Changed the suppress order and it works Big%20smile
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