protected void btn_ok_Click(object sender, EventArgs e) { //设置为ReportViewer处理模式到远程 rv_Dashboard.ProcessingMode = ProcessingMode.Remote; ServerReport serverReport = rv_Dashboard.ServerReport; //设置报表服务器URL和报表路径 rv_Dashboard.ServerReport.ReportServerUrl = new Uri("http://localhost/ReportServer_SQL2008"); //注意,这里的报表不需要加后缀. rv_Dashboard.ServerReport.ReportPath = "/报表项目/Dashboard_KPI"; //LIST 接受3个参数 ReportParameter[] LIST = new ReportParameter[3]; LIST[0] = new ReportParameter("Year", this.txt_Year.Text); ReportParameter BeginMonth = new ReportParameter(); BeginMonth.Name = "BeginMonth"; BeginMonth.Values.Add(this.txt_BeginMonth.Text); LIST[1] = BeginMonth; LIST[2] = new ReportParameter("EndMonth", this.txt_EndMonth.Text); // 设置参数的情况报告 rv_Dashboard.ServerReport.SetParameters(LIST); }
RDCL Server报表小例,举一返三
最新推荐文章于 2023-10-25 10:01:51 发布