首页 新闻 赞助 找找看

关于RDLC报表,做的demo在本机测试没问题,赋值到其他机器运行报错?

0
悬赏园豆:5 [已解决问题] 解决于 2016-11-26 11:45

关于RDLC报表,做的demo在本机测试没问题,赋值到其他机器运行报错?

请问这该怎么处理?呵呵,小白,求教,下面是调用的方法

   private void Form1_Load(object sender, EventArgs e)
        {
            LoadOrderDetailsData();
            ReportViewer reportViewer = new ReportViewer();

            reportViewer.ProcessingMode = ProcessingMode.Local;
            
            reportViewer.LocalReport.ReportPath = "Report1.rdlc";
            reportViewer.LocalReport.DataSources.Add(
                new ReportDataSource("DataSet1", LoadOrderDetailsData()));

            reportViewer.Dock = DockStyle.Fill;
            this.Controls.Add(reportViewer);
            //Process and render the report
            reportViewer.RefreshReport();
        }

        private DataTable LoadOrderDetailsData()
        {
            DataSet dataSet = new DataSet();
            dataSet.ReadXml("OrderDetailData.xml");
            return dataSet.Tables[0];
        }

 

不存在d的主页 不存在d | 初学一级 | 园豆:86
提问于:2016-11-26 10:49
< >
分享
最佳答案
1

z找不到指定程序集啊,你看下目标机器上面有没有对应的环境

收获园豆:5
hahanonym | 小虾三级 |园豆:1460 | 2016-11-26 11:37
其他回答(1)
0

度娘解决了,

需要在客户机上安装MICROSOFT REPORT VIEWER 2015 RUNTIME,单是这个玩意需要对应版本的SQLSysClrTypes

主要是缺少dll,msdn有说明https://msdn.microsoft.com/zh-cn/library/ms251723.aspx

运行 ReportViewer.exe 时,以下文件安装在部署计算机上的全局程序集缓存文件夹中。

  • Microsoft.ReportViewer.Common.dll

  • Microsoft.ReportViewer.ProcessingObjectModel.dll

  • Microsoft.ReportViewer.WebForms.dll

  • Microsoft.ReportViewer.WinForms.dll

  • Microsoft.ReportViewer.DataVisualization.dll

//////////////////////////////////////////////////////

下面是链接:

Microsoft® SQL Server® 2014 功能套件

https://www.microsoft.com/zh-CN/download/details.aspx?id=42295

MICROSOFT REPORT VIEWER 2015 RUNTIME

https://www.microsoft.com/zh-cn/download/details.aspx?id=45496

不存在d | 园豆:86 (初学一级) | 2016-11-26 11:42
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册