Using 'like' in ssrs expressions

blsub6 picture blsub6 · Jan 25, 2012 · Viewed 83.9k times · Source

I'm trying to highlight a field when the value has the word 'deadline' in it. I'm trying to use the expression:

=IIf(Fields!Notes.Value like "%deadline%","Yellow","Transparent")

in the BackgroundColor property.

It's not highlighting the field (not changing the background color). The 'Notes' field is a text datatype and I'm using Report Builder 3.0 if that makes a difference. What am I doing wrong?

Answer

devarc picture devarc · Jan 25, 2012

It is like in access: not '%' but '*':

=Fields!Notes.Value Like "*deadline*"