简体   繁体   中英

SSRS - Multiple Tablix Filters Based on Mutiple Parameter Values

I have an SSRS Report parameter set up with 3 different values ("Paid", "Denied" and "Open"). I want to set a tablix filter up so when the user selects one of the parameters, and a condition in the data is met, that row is returned. I want to give the user the option to select all there parameter values. When I use the following Expression into the Tablix filter(Paid), it works correctly:

=IIf(Parameters!ClaimStatus.Value(0) = "Paid"
    and Fields!TotalPaid.Value > "0"
, "Include"
, "Exclude")

If I try adding an additional filter(Denied) with the following Expression, neither filters work:

=IIf(Parameters!ClaimStatus.Value(0) = "Denied"
    and Fields!Denied.Value > "0"
, "Include"
, "Exclude")

Is it possible to pass multiple parameters into a Tablix Filter? I've searched all day with no luck. Any help would be greatly appreciated. Thanks.

You should set up the filter to check the values in teh DataSet are 'IN' the multi-select parameter

In this example my DataSet has a field called Status which could be Open, Paid or Denied.

I also have a multi-select parameter as you describe above called ClaimStatus .

Using the IN operator makes the filter look for instances where Status is in the list of ClaimStatuses selected. Note the default when you add the ClaimStatus parmater as an expression is to add a (0) on the end. Remove this

在此处输入图片说明

When this runs and I select Paid and Open, only the Paid an open records are returned in the table that has the results filtered.

在此处输入图片说明

Hopefully this will work for you. Let me know if I can assist further.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM