FAQ: How do I implement OR logic or complicated logics for filters in a SSRS report?
Question
When using filters in a report, you will find the limitation of the condition "and/or" in the filter pane as the following picture showed, you cannot change the condition "and" to "or" or any other logical operations:
(Reporting Services 2005)
(Reporting Services 2008&R2)
How can you do if you do not want to modify the dataset query for some reason?
Answer
To resolve this issue, for example, if you want to create a filter as the following form:
(Year = '2003') Or (Category = 'Bikes')
You can create a filter with an expression as below:
Expression:
=(Fields!Year.Value = "2003") or (Fields!Category.Value = "Bikes")
Operator:
=
Value:
= TRUE
Applies to
SQL Server Reporting Services 2005
SQL Server Reporting Services 2008
SQL Server Reporting Services 2008 R2
Comments
Anonymous
February 21, 2013
This doesn't work for an "IN" operatorAnonymous
April 21, 2014
Hi, If any one condition will true. i want show the filter. It's like a OR operator. How can i do the above case? Thanks in advance.Anonymous
July 01, 2015
This errors out, doesn't actually work