SQL Server Performance

Multivalue parameter problem : "The parameter X is

Discussion in 'SQL Server 2005 Reporting Services' started by deepaksql, May 9, 2007.

  1. deepaksql New Member

    Here is what I did.

    1.) Created a report parameter and selected multivaue parameter and passed the assigned dataset to the available values in the from query.

    2.) In the preview mode I was able to see a list box with the ckeck boxes and NOT select All because I am using SP1.

    Here is the problem I am facing..

    1.) We are calling all our reports through Windows forms application using ReportingServices2005 webservices.

    2.) For this perticular report because we have opted for Multivalue we are creating a dynamic listbox with the MultiSelect option.

    3.) By using the ValidValues property we are filling the list box in the report and using the listbox for selecting the selected items.

    4.) We are passing comma seperated Selected items to a parameter called X.

    5.) When we press display report button it says "The parameter X is missing a value " but when I see in the quick window it has all the selected items passed as comma seperated ("test,user,waste") to the parameter X.

    My question is : Does the Webservices identify Comma seperator for a passed parameter
    OR Please help me fix this problem.

  2. satya Moderator

    Yes it can programmatically pass multiple parameter sets via URL Access or the Web Services API.

    Satya SKJ
    Microsoft SQL Server MVP
    Writer, Contributing Editor & Moderator
    This posting is provided AS IS with no rights for the sake of knowledge sharing. Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it.
  3. cpcp New Member

    Hi Satya,
    I'm getting " Default value or value provided for the report parameter 'XX' is not a valid value. (rsInvalidReportParameter)". The XX parameter is a multivalue parameter Ex : 1,2. It works fine when we pass a single value but above error pops when passing 1,2 format.kindly advice. We are also encoding the URL.
  4. Adriaan New Member

    Hi cpcp,
    You're responding to a pretty old thread here ...
    Anyway, there is no simple 'multi-value' option. The usual solution is to make the procedure parameter a varchar that is long enough. The procedure can then use dynamic SQL to use the value list in an IN clause, like this:
    EXEC 'SELECT * FROM mytable WHERE Key IN (' + @param + ')'

Share This Page