Right click the field in question, and select format field. Go to the border tab, and click the X-2 button to the right of background color, and enter a formula:
If <<condition>> then silver else DefaultAttribute
This will give a silver highlight to this object if the condition evalautes to true. Software Training and Support for Macola, Crystal Reports and Goldmine
714-348-0964
dgilsdorf@mchsi.com
Go into Format Editor for the formula. Select Border, Background to get your conditional color. Click on the Formula Format Editor and enter your condition. Something like:
I used the above formula, works wonderfully. However, I am working with a DateValue field and when I ask it to change any records that are < 2002,03,01 it doesn't change the background color. It only effects those fields that have data in them. I need something to change 'Null' value fields to a color and leave those that are >'Null' alone.
if IsNull({Datefield}) then false else if {Datefield}<date(2002,3,1) then silver.
This will leave nulls alone with respect to the conditional formatting. Software Training and Support for Macola, Crystal Reports and Goldmine
714-348-0964
dgilsdorf@mchsi.com
I tried it anyway prior to getting your next post. The highlighting expert will not work with date fields, only number and currency. I tried everything. Any suggestions as far as the else if boolean requirement? I had that one somewhat working, but it was bass-ackwards, doing exactly the opposite of what I needed it to. It colored the fields with data in them.
The boolean problem is because I've never seen a boolean If expression with an Else If. It's just "...Then True Else False". There's no point putting an Else If in a boolean because if the first criteria was False, then anything in the Else - regardless of what the Else is going to say - must be True.
Here's what I think you should do - and don't tell anyone I told you this, because I think the type of solution I'm about to give you is cheap and nasty. However, I think it's the only way you can get a null field to look like it's adopting a colour.
Move the formula in question somewhere else.
Create a formula with nothing in it except " "
Drop the empty formula on your report where the null date formula is going to go.
Colour the background of the empty formula the colour you want the background of the null to be.
Conditionally suppress the empty formula with:
Not IsNull({@NullDateFormulaName})
Place the null date formula exactly over the empty formula.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.