From: bjkaledas on
I need to filter a table on two multi-value parameters, but also using the IN
operator.

I need something like this

Expression: =Trim(Fields!MyField.Value) IN
Parameters!MyMultiValueParameter.Value Or Trim(Fields!MyField.Value)

Operator: IN

Value: Parameters!MyMultiValueParameter2.Value



I tried doing it this way also to no avail. I know that what I have there
isn't correct, but I need soemthing like that to get this to work. I can't
do this on the SQL side due to the way the report is designed.

Expression: =IIf(Trim(Fields!MyField.Value) Like "*" &
Replace(Parameters!MyMultiValueParameter.Value.ToString(),",","*") & "*",
True, False)

Operator: =

Value: =True



It would work if I could do this:

Expression: =Trim(Fields!MyField.Value)

Operator: IN

Value: Parameters!MyMultiValueParameter1.Value

And/Or = Or

Expression: =Trim(Fields!MyField.Value)

Operator: IN

Value: Parameters!MyMultiValueParameter2.Value

From: Patrice on
Hi,

> I need to filter a table on two multi-value parameters, but also using the
> IN
> operator.

AFAIK multivalued parameters are exposed as arrays...

So I would try something such as :

Parameters!MyMultiValueParameter.Value.Contains(Fields!MyField.Value)

that is I would try to call on the array the Contains method that check if a
value is contained in the array...

If needed you can start by printing values such as
Parameters!MyMultiValueParameter.Value.GetType.ToString to get some details
about the context before going to the next step...

> I can't
> do this on the SQL side due to the way the report is designed.

Not sure why you can't but I always do this server side (parameters are
passed to my SP as "A,B,C" etc and I have a splitting function server side
that return a table with rows A, B,C etc...)

--
Patrice