C# 报表查看器怎样用代码更改报表 (刚才的问题,再加100分)

benbenRH 2009-04-12 09:25:41
C# 报表查看器怎样用代码更改报表

reportViewer1 开始是显示报表 report1.rdlc 的,
怎样用代买把它改为显示 report2.rdlc ,

谢谢!马上结贴
...全文
101 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
oneatree 2009-10-30
  • 打赏
  • 举报
回复
mark
zzxap 2009-04-12
  • 打赏
  • 举报
回复
[CODE=C#]
ds = clsDBProcess.GetDataSet(Session("Server"), Session("Database"), strsql)
ds.EnforceConstraints = False
ReportDoc.Load(Server.MapPath("~/report/employee.rdlc"))
ReportDoc.SetDataSource(ds.Tables(0))

CrystalReportViewer1.ReportSource = ReportDoc


更该rdlc
ds = clsDBProcess.GetDataSet(Session("Server"), Session("Database"), strsql)
ds.EnforceConstraints = False
ReportDoc.Load(Server.MapPath("~/report/employee2.rdlc"))
ReportDoc.SetDataSource(ds.Tables(0))

CrystalReportViewer1.ReportSource = ReportDoc



[/CODE]
yagebu1983 2009-04-12
  • 打赏
  • 举报
回复
搜搜。。。
wuyq11 2009-04-12
  • 打赏
  • 举报
回复
设置ReportPath
参考
lizzier 2009-04-12
  • 打赏
  • 举报
回复
再新建一个报表就可以了呀,然后把第一个给删除就行了~~
chinese_zmm 2009-04-12
  • 打赏
  • 举报
回复
不是很清楚,帮你顶

110,534

社区成员

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

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

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