How to pass parameter value from the site list where the rdl is running
Hi All, I am using reportviewer control to show the rdl files. I am using stored procedure to get data from the database. There are three parameters. 2 of them are user input parameters(user name and position) and the third one is logged in users area. This details will be available in the list. Can any one tell me how to pass parameter value from this list to the rdl in aspx page whch contains the reportviewer. How to pass parameter value from a share point list to a stored procedure in rdl file in aspx page.
August 9th, 2012 4:36am

SharePoint list cannot communicate with a stored procedure. You coudl pass the parameter in the report viewer. ReportViewer1.ProcessingMode = ProcessingMode.Remote; ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://localhost/reportserver"); ReportViewer1.ServerReport.ReportPath = "/MyReports/MyCustomReport"; ReportParameter[] reportParameters = new ReportParameter[2]; reportParameters[0] = new ReportParameter("xmlPrograms", Session["xmlParam"].ToString(), true); reportParameters[1] = new ReportParameter("myOtherParam", someValue, true); ReportViewer1.ServerReport.SetParameters(reportParameters); ReportViewer1.ServerReport.Refresh(); You could pass the value from the list as query string (for example).
Free Windows Admin Tool Kit Click here and download it now
August 14th, 2012 7:57am

SharePoint list cannot communicate with a stored procedure. You coudl pass the parameter in the report viewer. ReportViewer1.ProcessingMode = ProcessingMode.Remote; ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://localhost/reportserver"); ReportViewer1.ServerReport.ReportPath = "/MyReports/MyCustomReport"; ReportParameter[] reportParameters = new ReportParameter[2]; reportParameters[0] = new ReportParameter("xmlPrograms", Session["xmlParam"].ToString(), true); reportParameters[1] = new ReportParameter("myOtherParam", someValue, true); ReportViewer1.ServerReport.SetParameters(reportParameters); ReportViewer1.ServerReport.Refresh(); You could pass the value from the list as query string (for example).
August 15th, 2012 7:31am

I'm having a similar issue - as a test I have a report with one parameter. If I set a default parameter then the report runs no problem. If I attempt to set the parameter programmatically like so: reportParameterCollection[0] = new ReportParameter("DateParam", "8/1/2012", true); ReportViewer1.ServerReport.SetParameters(reportParameterCollection); ReportViewer1.ServerReport.Refresh(); Then the report control just spools like it's waiting for a value or something. Any assistance on how to troubleshoot this issue is greatly appreciated. I'm using Visual Studio 2010 with SQL Server 2008 R2 to generate the report file. Thanks! Carl
Free Windows Admin Tool Kit Click here and download it now
August 25th, 2012 5:58pm

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

Other recent topics Other recent topics