DenStudent
DenStudent

Reputation: 928

SSRS: filter parameter passed to sub-report

Let's say I have a dataset that looks like this:

ID | Name
1  | John
2  | Bill
3  | Mike (Inactive)
4  | Jim

I'm using that as a parameter in my main report, where the ID is the Value and Name is the Label. This works as wanted.

Now I have a subreport which is accessed by pressing a field on the main report. The field has an action set to go the the wanted subreport. At this moment, it is also passing all parameters.

This is what it looks like:

action tab

However, I want it to exclude all names that contain Inactive. I tried it by using expression such as

NOT(Parameters!pEmployee_List.Value LIKE "*Inactive*")

But when I pass to the subreport from the main, it gives the error that no parameter is selected.

Any ideas, suggestions?

EDIT:

After being pointed out by Stefan Steiger, I confused value en label. I would like the filter to work on value because it's being used a lot already on the subreport.

My second attempt:

=IIF(Parameters!pEmployee_List.Label LIKE "*Inactive*", "0", Parameters!pEmployee_List.Value)  

Upvotes: 3

Views: 702

Answers (1)

Stefan Steiger
Stefan Steiger

Reputation: 82356

The property "Value" searches in the ID, if you want to search in Name, you need to use the property "Label":

NOT(Parameters!pEmployee_List.Label LIKE "*Inactive*")

Upvotes: 1

Related Questions