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 a 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.
October 8th, 2010 3:31pm

Hi Bitmite, Based on your scenario, I get that you have several paramters: StartDate(single value)/EndDate(Single value)/UserID(Muitl-value). Here you want to pass the paramter value via the URL to jump to certain report from the original report. If I misunderstand you please feel free to let me know. From the expression you gave, I notice that the method is correct in your first expression. I make a test in local environment as well. I have two muitl-value parameters Month and Year, utilize the below expression and it works well, you could have a reference from below URL: ="http://challen1-msft/ReportServer?/DemoTest1/Muitl-parameterInURL&rs:Command=Render&Month=" & JOIN(Parameters!Month.Value, "&Month=")&"&Year="&Join(Parameters!Year.Value, "&Year=") Here, I would recommend you follow these steps to troubleshoot this issue: 1. Have a check to your expression; it should be like top URL’s format. You could refer to this as well 2. Make sure you click the View Report button after selecting the mutil-value parameter, if not it will just pass the parameters’ default value 3. Select the parameter, click view Report button, then click the link to jump to the report to see whether the link in the URL like this …….&rs:Command=Render&StartDate=9/6/2010&EndDate=10/7/2010&UserID=1121&UserID=1074&UserID=1106. If not, the error must relevant to your expression. 4. If step3 works fine, please have a check to your T-SQL for the dataset, as UserID is a muitl-value parameter, so the T-SQL should be like this: Select * from dbo.table where UserID in (@UserID) and …….. Please try top steps to troubleshoot the issue, and then give a feedback. Thanks, Challen Fu
Free Windows Admin Tool Kit Click here and download it now
October 11th, 2010 12:47pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics