Conditional formatting not working...

  • I'm trying to do some simple conditional formatting of font color where the text is changed to Red when two values within the report are not equal. If they are equal, it should leave it the original color of Dark Blue.

    I thought it would be done with the following code:

    =IIF((Fields!AmountCollected.Value <> Fields!ExpectedFare.Value), "Red", "Dark Blue")

    However, it's not quite working as expected. It does turn the text red when the two fields aren't equal, but it turns them Black if they are equal. I tried using the Switch function as well, but same results.

    I haven't seen anything online referencing conditional formatting specifically based on comparing two values to eachother so I wasn't sure if there's some special coding involved.

    Otherwise, what gives? Did I miss something here?

  • The problem is the colour "Dark Blue" - it does not exist.

    However "DarkBlue" does!

    :w00t:

    gsc_dba

  • Doh! (*picture some forehead slapping here*)

    Wow. What a difference once space makes. Thank you!!!!

    😀

  • Just like in grade school....spelling counts.

    They eyes just want a space to be there, so it is so easy to overlook a space.

  • tacy.highland (7/5/2011)


    Doh! (*picture some forehead slapping here*)

    Wow. What a difference once space makes. Thank you!!!!

    😀

    You mean like this?

    http://www.scarydba.com/2011/05/25/oh/

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply