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 发布
本文介绍如何使用C#设置ReportViewer控件为远程处理模式,并配置报表服务器URL及路径等参数,通过实例演示了如何传递报表参数。
2万+

被折叠的 条评论
为什么被折叠?



