使用Microsoft.ReportViewer报表后,得后动把相应动态库放到程序目录,否则程序在其他电脑无法运行。
VS2012的Microsoft.ReportViewer版本是11.0
vs2015的Microsoft.ReportViewer版本是12.0
把下面几个动态库文件提取出来放到程序根目录
Microsoft.ReportViewer.Common.dll
Microsoft.ReportViewer.ProcessingObjectModel.dll
Microsoft.ReportViewer.WebForms.dll
Microsoft.ReportViewer.WinForms.dll
Microsoft.ReportViewer.DataVisualization.dll
Microsoft.SqlServer.Types.dll
另外,报表文件的路径一定要用相对路径
如reportViewer1.LocalReport.ReportPath = Application.StartupPath + "\\Report1.rdlc";
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。