reportViewer最简单问题

KingGold 2007-06-20 11:02:40
winform 中如何将查询出的数据(DataSet或DataTable)显示在reportViewer?

我按以下方法做的,无任何效果,也不报错:
1、加了Report1.rdlc,reportViewer1数据源选择好了Report1.rdlc
2、代码:
DataSet DataSet1 = Class1.GetDataOLEDB("select * from tab_FundStatus");

BindingSource BindingSource1 = new BindingSource();

BindingSource1.DataSource = DataSet1;

ReportDataSource ReportDataSource1 = new ReportDataSource();

ReportDataSource1.Value = BindingSource1;

this.reportViewer1.LocalReport.DataSources.Add(ReportDataSource1);

this.reportViewer1.RefreshReport();
...全文
311 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
vainnetwork 2007-07-05
  • 打赏
  • 举报
回复
关注,顶
KingGold 2007-07-05
  • 打赏
  • 举报
回复
不用reportViewer了,各位朋友准备接分吧……
vainnetwork 2007-07-02
  • 打赏
  • 举报
回复
帮顶,关注下这个
amjmine 2007-07-02
  • 打赏
  • 举报
回复
再简单也不懂啊
patizi 2007-06-28
  • 打赏
  • 举报
回复
this.reportViewer1.ReportDocument.SetDataSource(DataSet1);
我也觉得是这个.
JavaK 2007-06-22
  • 打赏
  • 举报
回复
this.reportViewer1.ReportDocument.SetDataSource(DataSet1);
KingGold 2007-06-20
  • 打赏
  • 举报
回复
DataSet DataSet1 = Class1.GetDataOLEDB("select * from tab_FundStatus");
这一句是取得一个mdb库中的表数据,测试无误的。

4,818

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 图表区
社区管理员
  • 图表区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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