none
.rdl Report not working when filtering on a parameter that uses multiple values

    Question

  • Hi

    I have a .rdl with multiple parameter year that the user can select. I run a stored procedure that return all data but as soon as I put a filter in my dataset it returns no data.

    The parameter year is not parsed to my stored procedure. It is only used with the filter.

    Why doesn't it work?

    Expression: Year

    Operator: In

    Value: @p_Year

    Please please help. Thanks

    Thursday, October 04, 2012 12:17 PM

Answers

All replies

  • Multivalue parameter is an array. On the parameters tab of your dataset, try setting the value of the parameter to: =Join(@p_Year,","). That will convert it to 2010,2011,2012.

    Thursday, October 04, 2012 12:53 PM
  • Hi

    I did do that. But thanks for the advice. It works fine until I put the filter in. If no filter, then all my data returns. With filter, nothing. E.G. when all data is returned I can see data for 2011, 2012. As soon as I add the filter on parameters - 2011, 2012 then no data.

    Thursday, October 04, 2012 1:02 PM
  • What is the data type of the SQL Data? What is the parameter data type? Make sure you aren't comparing string to int.
    Thursday, October 04, 2012 1:14 PM
  • Hi

    Type is text and parameter type is string.

    Thursday, October 04, 2012 1:52 PM
  • Hi Sunette,

    Try This Efficent way to passing multivalue parameterMultivalue parameter



    blog:My Blog/

    Hope this will help you !!!
    Sanjeewan

    • Marked as answer by Sunette Thursday, October 04, 2012 2:14 PM
    Thursday, October 04, 2012 1:56 PM