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?
To add an expression to a text box For a simple expression, type the display text for the expression in the text box. For example, for the dataset field Sales, type [Sales] . For a complex expression, right-click the text box, and select Expression. The Expression dialog box opens.
In the Report Data pane, expand the Parameters node, right-click the report parameter that was automatically created for the dataset parameter, and then click Parameter Properties. In the General tab, select Allow multiple values to allow a user to select more than one value for the parameter.
Try using apostrophe to write a comment. 'This is a sample comment. EDIT: VB doesn't really have multiline comment. EDIT2: Also, it seems that comment should be in the end.
It is like in access: not '%' but '*':
=Fields!Notes.Value Like "*deadline*"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With