parameter passing while generating report in ASP.NET

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);

Browse More Popular Posts

Leave a Comment