Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Suppress on background color Post Reply Post New Topic
Author Message
hungtran817
Newbie
Newbie


Joined: 07 Mar 2007
Location: United States
Online Status: Offline
Posts: 8
Quote hungtran817 Replybullet Topic: Suppress on background color
    Posted: 07 Mar 2007 at 5:54am

I'm having a problem finding a way to suppress based on background color.

example:
 
item      1    2    3
x         red  red  blue          
y         red  red  red
z         red  red  red
 
I want to suppress any row with the blue background. 
 
Any suggestion would be appreicated,
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 07 Mar 2007 at 6:04am
What formula are you using to determine the background color?  You're going to have to base the suppress formula for the row on the conditions that cause the blue background.  For example:
 
Field1 color formula:
If {table.Field1} < 0 then crRed else crBlue
 
Field2 color formula:
If {table.Field2} < 0 then crRed else crBlue
 
Field3 color formula:
If {table.Field3} < 0 then crRed else crBlue
 
Row suppress formula:
{table.Field1} >= 0 or
{table.Field2} >= 0 or
{table.Field3} >= 0
 
-Dell
 
IP IP Logged
hungtran817
Newbie
Newbie


Joined: 07 Mar 2007
Location: United States
Online Status: Offline
Posts: 8
Quote hungtran817 Replybullet Posted: 07 Mar 2007 at 6:37am

Here's my formula for the background:

if ({@MD-APRIL} < 1.25 and {@MD-APRIL} > .80) or  Sum ({@april}, {Monthly_INV.ITEMNMBR}) < .001 and (Sum ({@March}, {Monthly_INV.ITEMNMBR}) < .001) or Sum ({@april}, {Monthly_INV.ITEMNMBR}) < .001 and (Sum ({@March}, {Monthly_INV.ITEMNMBR}) > .001) then crnocolor
  else crred
 
This is a cost comparison report. If the cost has a difference of 20% then make BG red.  I have this formula across the whole 12 months. 
 
If I don't suppress the items without changes , it will be a 300 page report. I have done a similar report for 2006, but for this year it gets a little tricker.
 
The upcoming months doesn't have a cost so that's the reason I had to
add the last condition. If I didn't it would have give all the next month a red GB. 
 
Because of the las condition, I couldn't suppress the row.
 
 
IP IP Logged
hungtran817
Newbie
Newbie


Joined: 07 Mar 2007
Location: United States
Online Status: Offline
Posts: 8
Quote hungtran817 Replybullet Posted: 07 Mar 2007 at 6:46am
I think I figure it out.  I'm going to include another condition based on the current date.  If it's march then suppress march > 0 and april < 0.
 
Thanks,
IP IP Logged
hungtran817
Newbie
Newbie


Joined: 07 Mar 2007
Location: United States
Online Status: Offline
Posts: 8
Quote hungtran817 Replybullet Posted: 07 Mar 2007 at 6:57am

Bad formula, the formula will suppress everything. 

Any suggestions?
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.016 seconds.