RDLC指定多个数据源

孫大聖 2014-08-21 10:30:26
如下图,rdlc中拖入两张表,一张是按照Dept,一张是按照CC分类的

请问如何给这两个表指定不同的数据源。



DataTable dt = BLL.Tools.GetTable(strSql);


ReportViewer1.LocalReport.ReportPath = "CostAnalyse/CostMonitoringReport.rdlc";

//显示报表
ReportViewer1.LocalReport.DataSources.Clear();
ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("dtCostMonitoring", dt));
ReportViewer1.LocalReport.Refresh();
...全文
132 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
孫大聖 2014-08-21
  • 打赏
  • 举报
回复
或者把上面重复的分组取消

110,546

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧