JVGBI
JVGBI

Reputation: 575

Hide or show SSRS component based on multivalue parameter

I have an SSRS report that is based on a parameter that can have multiple values. For example: '0','1' and '0','2' (like an IN statement).

Now, I have to show certain parts in the the report whenever the parameter is 0 AND 1, and hide certain parts in the report whenever the parameter is 0 AND 2.

But… This 0 value is always the issue here. I know I have to use the visibility expression for this, but I cannot seem to write the correct expression.

So, when my parameter (Parametername = Prognosis) is (0 and 1), I need the component to show. When my parameter is (0 and 2), I need the component to hide. By the way, it is never just '0', or just '1', or just '2'.

I tried this, but no success:

=IIF(Parameters!Prognosis.Value(0) = 0 and Parameters!Prognosis.Value(0) = 1,False,IIF(Parameters!Prognosis.Value(0) = 0 and Parameters!Prognosis.Value(0) = 2,True,False))

Could someone help me with writing this expression?

Thank you guys

Upvotes: 0

Views: 1603

Answers (1)

BishNaboB
BishNaboB

Reputation: 1070

Use join() to put the values of the parameter into a string. So it would be..

=join(Parameters!Thingy.Value, ",")

Then you can see what values are returned by the string. e.g.

=iif(join(Parameters!Thingy.Value, ",") = "0,1", TRUE, FALSE)

Upvotes: 1

Related Questions