reportviewer报表高手请进,一天未work out来的问题

GoodShot GoodShot 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

忙了一天的报表控件reportviewer,看了很多网上的方法,挨个测试了一遍,测试时网页均不显示数据。
下面是我最终的代码County_union_SectorTownTableAdapter是添加的数据集文件(.xsd)文件成的类,cus的GetData()得到的是表“County_union_SectorTown”的数据(这个做断点测试没有问题,能正常读取到记录)
ReportViewer1.LocalReport.ReportPath = Server.MapPath("Manage_city.aspx_report.rdlc");
County_union_SectorTownTableAdapter cus = new County_union_SectorTownTableAdapter();

Manage_city_report.County_union_SectorTownDataTable gvcr = cus.GetData(); ;

ReportDataSource rds = new ReportDataSource("County_union_SectionTown", gvcr);//这个引号的County_union_SectionTown是我随便起的名字,不知道跟这个又没有关系
this.ReportViewer1.LocalReport.DataSources.Add(rds);

ReportViewer1.DataBind();

ReportViewer1.LocalReport.Refresh();
...全文

相关推荐

评论 3
收藏 已收藏
分享
返回顶部
GoodShot
图表区 4,818 成员 14,133 内容