如何正确安装 和使用Microsoft.ReportViewer.WinForms.dll 里的控件 reportviewer?
0
我这里有一个项目,可以使用 第三方.net 控件,我感觉SSRS做报表很方便,准备用Reportviewer展现报表。我加载了Microsoft.ReportViewer.WinForms.dll 和Microsoft.ReportViewer.Common.dll, reportviewer 控件打开错误,不知道该怎么办?
错误提示:
Failed to create control System.Reflection.TargetInvocationException: 调用的目标发生了异常。 ---> System.IO.FileNotFoundException: 未能加载文件或程序集“Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。系统找不到指定的文件。
文件名:“Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”
在 Microsoft.Reporting.WinForms.LocalReport..ctor()
在 Microsoft.Reporting.WinForms.ReportViewer.Reset()
在 Microsoft.Reporting.WinForms.ReportViewer..ctor()
警告: 程序集绑定日志记录被关闭。
要启用程序集绑定失败日志记录,请将注册表值 (DWORD)设置为 1。
注意: 会有一些与程序集绑定失败日志记录关联的性能损失。
要关闭此功能,请移除注册表值 。
--- 内部异常堆栈跟踪的结尾 ---
在 System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
在 System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
在 System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
在 System.Activator.CreateInstance(Type type, Boolean nonPublic)
在 ArchestrA.Visualization.GraphicLibrary.aaEmbeddedClientControl.CreateControl()
在 ArchestrA.Visualization.GraphicLibrary.CommonControls.aaControlBase.InitControlInternal(Boolean createhost)
错误提示:
Failed to create control System.Reflection.TargetInvocationException: 调用的目标发生了异常。 ---> System.IO.FileNotFoundException: 未能加载文件或程序集“Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。系统找不到指定的文件。
文件名:“Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”
在 Microsoft.Reporting.WinForms.LocalReport..ctor()
在 Microsoft.Reporting.WinForms.ReportViewer.Reset()
在 Microsoft.Reporting.WinForms.ReportViewer..ctor()
警告: 程序集绑定日志记录被关闭。
要启用程序集绑定失败日志记录,请将注册表值 (DWORD)设置为 1。
注意: 会有一些与程序集绑定失败日志记录关联的性能损失。
要关闭此功能,请移除注册表值 。
--- 内部异常堆栈跟踪的结尾 ---
在 System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
在 System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
在 System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
在 System.Activator.CreateInstance(Type type, Boolean nonPublic)
在 ArchestrA.Visualization.GraphicLibrary.aaEmbeddedClientControl.CreateControl()
在 ArchestrA.Visualization.GraphicLibrary.CommonControls.aaControlBase.InitControlInternal(Boolean createhost)
没有找到相关结果
重要提示:提问者不能发表回复,可以通过评论与回答者沟通,沟通后可以通过编辑功能完善问题描述,以便后续其他人能够更容易理解问题.
5 个回复
梁勇 - 天道酬勤、上善若水。爱好商业智能 2014-02-25 回答
赞同来自:
feng4887 - 70后IT菜鸟 2014-02-25 回答
赞同来自:
feng4887 - 70后IT菜鸟 2014-02-25 回答
赞同来自:
PS:梁兄的方法没问题,只不过我觉得这么做有点杀鸡用牛刀了 :)
梁勇 - 天道酬勤、上善若水。爱好商业智能 2014-02-25 回答
赞同来自:
feng4887 - 70后IT菜鸟 2014-02-27 回答
赞同来自:
微软官方的描述:Microsoft Report Viewer 2010 SP1 Redistributable Package 包含用于查看使用 Microsoft 报告技术设计的报告的控件。