3
votes

I have an ASP.NET page which has report viewer control to access reports from report manager.

  • I need to pass report parameter from this ASP.NET page to the report server.
  • I want to pass region number based on user logged in, which is displayed on a label in ASP.NET page.

Thanks.

1
It´s a bit late but I have teh same problem and resolved using this video tutorial: youtube.com/watch?v=psLVbNx0GtU And using the solution posted by Mcbeev.SantiCarta

1 Answers

5
votes

I'm assuming your using remote processing of the report.

Then do the following:

ReportParameter p = new ReportParameter("ParamName", "ParamVal");
reportViewer1.ServerReport.SetParameters(new ReportParameter[] { p });

From: http://msdn.microsoft.com/en-us/library/ms252178(VS.80).aspx

Good example: http://www.codeproject.com/KB/reporting-services/ReportViewer2005.aspx