Method Community

 

Report Designer Conditional Formatting based on Text?

Last post 05-04-2017 11:37 AM by Maureen. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 05-02-2017 3:21 PM

    Report Designer Conditional Formatting based on Text?

    I am familiar with report designer and can make conditional formatting work when it is numbers that I am dealing with, however I can not figure out what formula to use when for instance I want the text to be Red if it includes the word "Ready".  Can Anyone help me with this? 

  • 05-03-2017 4:35 PM In reply to

    Re: Report Designer Conditional Formatting based on Text?

    Hi there Maureen,

    The Conditional Formatting for Text is much the same as the conditional formatting you are used to using for Numerical values. 

    For your Scenario - The Formula applied to your control would look something like

    [FieldName] Like 'Ready'  - Making sure to use the Single quotes to Bookend the string you are comparing. Alternatively, you can use == instead of Like if you are sure that "Ready" will be the only data in this field.


    Thanks Maureen!


    -Ben

    Ben Hargreaves
    Senior Support Specialist
    Method:CRM
    b.hargreaves@method.me
    Toll Free: 1.888.925.6238
    Local & Overseas: 416.847.0400
    Fax: 416.640.6027
  • 05-04-2017 10:00 AM In reply to

    Re: Report Designer Conditional Formatting based on Text?

    Hi Ben,

    Thank you for your help! Big Smile I can get that to work if I use the exact match of all words in the field.  However if I want the condition based on the inclusion of just 1 word from a phrase in the field, how do I do that?  I did use just the single quotes and I have tried changing "Like" to "In", but that does not work.  I get no reaction if I don't use the entire phrase.

  • 05-04-2017 10:51 AM In reply to

    Re: Report Designer Conditional Formatting based on Text?

    Hi Maureen,

    No Problem! Happy to help.

    To get the formatting to also apply to strings not exactly matching the field - you can utilize the CharIndex('String1','String2') Function. CharIndex takes String1 (the value you are checking for - 'Ready' in this case) and compares it against String2 - returning the position where the function found a match. If no Match is found, the function will return -1 as the position value.

    So, leveraging this function - your formatting would look something like this -

    (CharIndex('Ready', [FieldName])) != -1


    Basically - the Conditional Formatting will occur if there is any 'position' value returned by the CharIndex function (i.e. It found a match).

    Thanks Maureen!

    Regards,

    Ben

    Ben Hargreaves
    Senior Support Specialist
    Method:CRM
    b.hargreaves@method.me
    Toll Free: 1.888.925.6238
    Local & Overseas: 416.847.0400
    Fax: 416.640.6027
  • 05-04-2017 11:37 AM In reply to

    Re: Report Designer Conditional Formatting based on Text?

    Thanks Ben!! Smile  I most Definately would not have gotten there on my own!! 

    Much Appreciated!  (I was looking for a happy dance emoji but didn't find one) Big Smile

Page 1 of 1 (5 items)