none
Passing Parameter inReport Viewer RRS feed

  • Question

  • Hi,

     

    I build a .aspx web page in which i took a drop down box, 2 Radio button, 4 check box and report viewer control. I want to pass parameter in report viewer control by user selection on button click.

    Gaurav

    Wednesday, September 8, 2010 12:40 PM

All replies

  •       Microsoft.Reporting.WinForms.ReportParameterCollection rc = new Microsoft.Reporting.WinForms.ReportParameterCollection();
          rc.Add(new Microsoft.Reporting.WinForms.ReportParameter("Name", nameVariable));
          rc.Add(new Microsoft.Reporting.WinForms.ReportParameter("Facility", facilityVariable));
    
          reportViewer1.LocalReport.SetParameters(rc);
    
    Hope this helps!
    Thursday, September 9, 2010 4:14 PM