crystal-reportsconditional-formattingcrystal-reports-2008

Crystal Report - text colour change


I am using a formula field that has a description text (string object). I would like to change the font colour if the description of the text contains partial value. eg. Brisbane Exhibition Centre - if the description has "Exhibition"word then colour should be red.

The intention is to highlight a text that has a specific word, this is similar when we do this in excel in conditioning formula "Text that contains "and chagne colour to RED.

Kind Regards, Mudit

I tried changing field with adding formula using like operator but did not help.


Solution

  • Right-click the formula field, Format Field..., select Font tab and select the button to set an expression for the Color property. For example:

    IF instr(CurrentFieldValue, "Exhibition")> 0 Then crRed
    Else IF  instr(CurrentFieldValue, "Conference") > 0 Then crRed
    Else crBlack