Multiple Values in URL's

  • Hello,

    I have a report(naturally), in this report I have link to other reports to generate the PDF versions of those reports. It all works except when I pass multiple values via the URL from the multiple values dropdown parameters in my original report.

    Here is what I have tried, the first one works, but only returns the first users information, it ignores 1074 and 1106.

    Expression: ="balbla...rs:Command=Render&StartDate=" & First(Fields!ThirtyOneDaysAgo.Value, "GetDates") & "&EndDate=" & Today & "&UserID=" & cstr(join(Parameters!UserID.Value, "&UserID="))

    Renders: &rs:Command=Render&StartDate=9/6/2010&EndDate=10/7/2010&UserID=1121&UserID=1074&UserID=1106

    Expression: ="balbla...rs:Command=Render&StartDate=" & First(Fields!ThirtyOneDaysAgo.Value, "GetDates") & "&EndDate=" & Today & "&UserID=" & cstr(join(Parameters!UserID.Value, "%2c"))

    Renders: rs:Command=Render&StartDate=9/6/2010&EndDate=10/7/2010&UserID=1121%2c1074%2c1106

    IE Error: The value provided for the report parameter 'UserID' is not valid for its type. (rsReportParameterTypeMismatch)

    Expression: ="balbla...rs:Command=Render&StartDate=" & First(Fields!ThirtyOneDaysAgo.Value, "GetDates") & "&EndDate=" & Today & "&UserID=" & cstr(join(Parameters!UserID.Value, ","))

    Renders: &rs:Command=Render&StartDate=9/6/2010&EndDate=10/7/2010&UserID=1121,1074,1106

    IE Error: The value provided for the report parameter 'UserID' is not valid for its type. (rsReportParameterTypeMismatch)

    Thanks for any insight.

  • html query string does not pass comma delimited lists; if the object (like a select list) has more than one value, it repeats like this:

    ?bob=one&bob=two

    so you need to build your querystring like this:

    ?UserID=1121&UserID=1074&UserID=1106

    here's a simple example so you can see the query string where the object is the same, but there are more than one value:

    <form method=get action="/">

    <input type="text" name="bob" value="one">

    <input type="text" name="bob" value="two">

    <input type="submit">

    </form>

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thank Lowell, that's were I'm having the issue, the report isn't taking the other multiple values passed in the URL into account when rendering the report.

    http://domain.com/ReportServer/Pages/ReportViewer.aspx?%2fNew+Opportunities&rs:format=PDF&rs:Command=Render&StartDate=9/7/2010&EndDate=10/8/2010&UserID=1121&UserID=1074&UserID=1106&UserID=1084

    So in the above example only the data for UserID=1121 get's displayed in the report, the other UserID's are ignored for some reason. The report I'm trying to open does have a corresponding multiple values parameters that is working with the exact same data.

    Can you see anything I'm missing?

    Thanks

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

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