如何在vs2005中调用部署成功的rdl报表,注意是rdl(服务器报表) 不是rdlc(本地模式)

kkk444dsfsa 2011-01-19 09:56:08
在ie栏输入http://localhost/reportserver/ 的话可以成功查看报表
但是在vs2005中如何调用这张报表呢?
...全文
250 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
wdb763558331 2011-09-27
  • 打赏
  • 举报
回复
我也在等 还请高人指教
kkk444dsfsa 2011-01-20
  • 打赏
  • 举报
回复
难道没有人使用rdl 做服务器端报表?
kkk444dsfsa 2011-01-19
  • 打赏
  • 举报
回复
我在本地也是可以的 但是用服务器报表就是不行啊 谁用过的 给个可行的代码
sorry0481 2011-01-19
  • 打赏
  • 举报
回复

//上面那个本地的肯定可以,如果是服务器上的,可以试试
reportViewer1.LocalReport换成reportViewer1.ServerReport.ReportPath
reportViewer1.ServerReport.GetDataSources();
reportViewer1.RefreshReport();
sorry0481 2011-01-19
  • 打赏
  • 举报
回复



在窗体上添加reportViewer控件
必须的命名空间:using Microsoft.Reporting.WinForms;

DataTable dt =报表要显示的数据集;

reportViewer1.LocalReport.ReportPath = 路径是你rdl文件的路径;

//DataSet1是数据集名称,你rdl里给定的,默认是DataSet1
reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", dt));
reportViewer1.RefreshReport();

111,125

社区成员

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

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

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