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