关于.net中使用reportview所需注意

参考文章链接:http://www.cnblogs.com/watercold/p/5258608.html

这段时间在做一个winform的小项目时,发现使用.net中的ReportViewer插件的时候出现了一些小问题,这里码住。

使用ReportViewer需注意打包时需要将dll文件引用到exe目录。否则会出现他人使用时找不到文件的错误,例如:

遇见类似错误,只需要将ReportViewer所需的dll引入目录即可。所需要dll如下:

  • Microsoft.ReportViewer.Common.dll
  • Microsoft.ReportViewer.DataVisualization.dll
  • Microsoft.ReportViewer.DataVisualization.resources.dll
  • Microsoft.ReportViewer.ProcessingObjectModel.dll
  • Microsoft.ReportViewer.WinForms.dll
  • Microsoft.ReportViewer.WinForms.resources.dll
  • Microsoft.SqlServer.Types.dll

在拷贝这些组件到exe时,Microsoft.ReportViewer.WinForms.dll以及Microsoft.ReportViewer.WinForms.resources.dll在visual studio的目录下进行寻找,如图

 剩下的几个组件在C:WindowsassemblyGAC_MSIL中寻找,如图:

原文地址:https://www.cnblogs.com/gentlemanzq/p/11581276.html