1
votes

Good day

I have a SSRS report that has 4 filters. One of the 4 filters is a "Search Parameter".

When the user uses the "Search Parameter" (field/filter, types something in), I want to ignore the other three filters despite them having values or not.

I've tried CASE/SWITCH statements in the Expression of the Parameter (DataSet Properties), but no luck.

Does anyone have an idea on how I can get this done

1
Are you applying these filters at a tablix/chart level? - Ian Preston

1 Answers

2
votes

The Filter is quick and convenient but only allows AND relationships between the filter criteria and you want an OR relationship here.

The good news is that you can make more complex filter logic by using expressions. We will create a boolean filter expression that evaluates to whether you want to filter the row or not and compare this to True.

Have only one filter criterion and click the expression editor button. Make the expression something like:

=IIF(IsNothing(Parameters!SearchParameter.Value), Fields!Field1.Value = Parameters!Field1Parameter AND Fields!Field2.Value = Parameters!Field2Parameter AND Fields!Field3.Value = Parameters!Field3Parameter, Fields!SearchField.Value LIKE "*" & Parameters!SearchParameter.Value & "*")

Make the expression type be Boolean, the Operator = and the Value True.