parameter passing while generating report in ASP.NET

331 views Asked by At

I have attached a figure. I know how to generate report in ASP.NET. Please suggest me how to pass parameter while generating report exactly as shown in the figure. enter image description here

Is there any video related to this

1

There are 1 answers

0
cyberj0g On

Looks like SSRS ReportViewer control. You have 2 options:

  1. If you're using default SSRS ReportViewer.aspx you can pass parameter through the URL, like that:

    http:///ReportServer/Pages/ReportViewer.aspx?PathToReport&rs:Command=Render&ExamYear=2013

  2. If you're using ReportViewer control directly, pass parameter in the codebehind:

    ReportParameter examYearParam = new ReportParameter("ExamYear", 2013); reportViewer1.ServerReport.SetParameters(examYearParam);