Reputation: 1870
I need to filter on a tablix to return where values in the string contains "BLACK" OR "RED":
Expression: =Fields!DrawOfficeNum.Value Like "*BLACK*" AND Fields!DrawOfficeNum.Value Like "*RED*"
Operator: Like
Value: True
I'm getting no results back and I know there is results. Help will be greatly apreciated!
Upvotes: 1
Views: 5622
Reputation: 1
It seems to work more easily in this way :
It will know that you works on a string type (depends on your field type), and generate a list separated with ;
If i am wrong, can anyone tell me?
Upvotes: 0
Reputation: 63830
Quote, emphasis mine:
I need to filter...where values in the string contains "BLACK" OR "RED":
Quote, emphasis mine:
=Fields!DrawOfficeNum.Value Like "*BLACK*" AND Fields!DrawOfficeNum.Value Like "*RED*"
Change the AND
into OR
in your expression, then you're good to go.
Upvotes: 3
Reputation: 39586
I would do it like this:
Expression (Text type):
=IIf(InStr(Fields!DrawOfficeNum.Value, "BLACK") > 0 or InStr(Fields!DrawOfficeNum.Value, "RED") > 0
, "Include"
, "Exclude")
Operator: =
Value: Exclude
This gives results:
Only thing to not is that I turned the filter from a Boolean to a Text type - in the past I've always had problems with Boolean filters and the option above works well, as per the screenshot.
Upvotes: 8