multi value error srs 2005

  • I have a report that has muti values.

    It uses a Stored procedure to populate the report.

    My stored procedure is simple just select * from mytable where id in (@ID)

    If I just enter one value in the value box the report runs fine. If i put more than one value in the parameter box I get

    "The value provided for the report parameter 'ID' is not valid for its type. (rsReportParameterTypeMismatch)"

    My parameter is an INT. I tried changing the parameter to sting to no avail I tried using convert in my s-procedure to no avail.

    Any suggestions?

    I am using sql 2005 and sql reporting 2005

    Thanks

  • I read an article here about this the other week.

    http://www.sqlservercentral.com/columnists/ADavel/3138.asp

    However, I haven't had an performance issues yet and use one of two methods.

    The easiest way is if you are using a table of matrix to display the dataset add a filter and use the field with the "IN" operator and the parameter variable as the value. This way SSRS sorts out the complicated bit for you.

    The other method I is described in the article above, pass in a string to an SP and use a function to split it into a table and then use the "IN" operator in the where clause.

    where

    Service in (select DataValue from rfn_Split(@Service, ','))

    If you need the code for the script function there are plenty of examples on this site. Make sure you use a varchar(max) for the string if you expect long strings.

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

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