如何将dataset绑定到水晶报表中并显示出来 在线等 不吃饭了!

rock211 2007-12-28 03:31:10
我写的东西 就是水晶报表里是空的 数据集dataset1 我配的就是stuinf表 请各位看一下 多谢了啊 不吃饭了
Dim sqlString As String = "select * from stuinf"
Dim da As New SqlDataAdapter(sqlString, conn)
Dim crReportDocument As New CrystalReport2
Dim ds As New Dataset1
conn.Open()
da.Fill(ds)
crReportDocument.SetDataSource(ds)
CrystalReportViewer1.ReportSource = crReportDocument
conn.Close()
...全文
111 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
aircall 2008-01-01
  • 打赏
  • 举报
回复
crReportDocument.SetDataSource(ds.Tables[0])
SeeSunSet 2007-12-30
  • 打赏
  • 举报
回复
fill时候要指定tablename..此点切记...

4,820

社区成员

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

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