using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Microsoft.Reporting.WebForms; namespace Practice { public partial class WebForm1 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { ShowReport(); } public void ShowReport() { ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://xxxxxxxxx/ReportServer"); ReportViewer1.ServerReport.ReportPath = "/Practice Reports/Parameter_Example"; ReportViewer1.ShowParameterPrompts = false; ReportParameter[] param = new ReportParameter[1]; param[0] = new ReportParameter("ProductCategoryID", "Gloves"); ReportViewer1.ServerReport.SetParameters(param); ReportViewer1.ServerReport.Refresh(); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)