Filter Expression

  • I have to add a filter to the table in SSRS Report

    so in the expression i have to select the fieldabc.value

    In the operator I am selected the "In" operator

    and the value i am saying if the Parameter.value(0) = 'Test' then ("ABC","DEF"),fieldabc.value

    so basically what i am trying to do is, based on the parameter selection i am using the IN operator for multiple hard coded values

    but when i say below expression it works fine

    Parameter.value(0) = 'Test' then "ABC",fieldabc.value

    when i try to concatenate another value it's not working

    Parameter.value(0) = 'Test' then ("ABC","XYZ"),fieldabc.value

  • If I understand what you are trying to do correctly the "in" filter requires an array, you cant pass it multiple values separately. You can create an array by writing all your hardcoded values into a comma delimited string and using split().

    So in your filter change your iif statement to:

    =Iif(Parameters!Parameter1.Value(0) = "Test", Split("ABC,XYZ",","), Fields!FieldABC.Value)

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply