Accepting a passed multi-value parameter in SSRS 2008

  • I want to create a dashboard report that needs to accept a passed, not user selected CustomerNumber parameter on which it will filter the returned data. The catch is that there may be more than 1 CompanyNumber that need to be passed. For example, CompanyNumbers 5,16,21,67.

    Is it possible to accept them, and if so, how should the parameter be set up in SSRS, and what format should the data being passed be in? And what else must be set up in the report to accept it?

    Thank you.

  • Well, I guess it really all depends...

    Will the user be able to select different client ids once the report loads? Or is this strictly a sub-report type of situation where they'll need to go back tot he previous one?

    This post has one way of doing it...

    http://www.sqlservercentral.com/Forums/Topic891885-150-1.aspx

    If there' no way the user can change it, then I'd say pass it to a hidden parameter field that you can have as a delimited string (Use the Join() command to create your string to pass to your sub-report). Pass that string to your stored procedure and parse it using a Tally or Numbers table to generate your SQL Query.

    check out Jeff's Tally Table article[/url] for more information about doing it that way.

    Basically you parse the string to a temp table or table variable and then join to it Or use an Exists statement of whatever best suits your data.

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • Luke L (8/31/2010)


    Well, I guess it really all depends...

    Will the user be able to select different client ids once the report loads? Or is this strictly a sub-report type of situation where they'll need to go back tot he previous one?

    This post has one way of doing it...

    http://www.sqlservercentral.com/Forums/Topic891885-150-1.aspx

    If there' no way the user can change it, then I'd say pass it to a hidden parameter field that you can have as a delimited string (Use the Join() command to create your string to pass to your sub-report). Pass that string to your stored procedure and parse it using a Tally or Numbers table to generate your SQL Query.

    check out Jeff's Tally Table article[/url] for more information about doing it that way.

    Basically you parse the string to a temp table or table variable and then join to it Or use an Exists statement of whatever best suits your data.

    -Luke.

    Thank you. It's going to be little while before I can let you know if I succeeded. I'm sure what you say is correct. It's just doing everything right (me) that may take some time. FYI, the dashboard situation is a no user input report with child reports. They have clickable fields, and back buttons, (thanks again to you). In short, they can click on various statistical metrics to drill down a couple of layers, each layer having more information, and with the back button, go up one level each time.

    Thank you again, and I will surely let you know how it turned out.

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

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