加载报表失败问题
我用C#开发一个程序,用到了vs2005内部集成的水晶报表,当我打包成安装程序时,水晶报表打印块出现错了.请问我该如何部署,才能让水晶报表运行正常呢?
谢谢!
错误如下:
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。
************** 异常文本 **************
System.Exception: 加载报表失败。 ---> System.Runtime.InteropServices.COMException (0x80004005): 系统找不到指定的路径。 在 CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)
在 CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)
在 CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
--- 内部异常堆栈跟踪的结尾 ---
在 CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
在 CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
在 CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename)
在 KuCunGuanLi.CangKu.frmYearReport.CrystalReports(String crystalreportname) 位置 G:\work\进销存\仓库管理1208\仓库管理\KuCunGuanLi\CangKu\frmYearReport.cs:行号 143
在 KuCunGuanLi.CangKu.frmYearReport.frmYearReport_Load(Object sender, EventArgs e) 位置 G:\work\进销存\仓库管理1208\仓库管理\KuCunGuanLi\CangKu\frmYearReport.cs:行号 80
在 System.Windows.Forms.Form.OnLoad(EventArgs e)
在 System.Windows.Forms.Form.OnCreateControl()
在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
在 System.Windows.Forms.Control.CreateControl()
在 System.Windows.Forms.Control.WmShowWindow(Message& m)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
在 System.Windows.Forms.ContainerControl.WndProc(Message& m)
在 System.Windows.Forms.Form.WmShowWindow(Message& m)
在 System.Windows.Forms.Form.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** 已加载的程序集 **************
mscorlib
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///F:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
KuCunGuanLi
程序集版本: 1.3.1.0
Win32 版本: 1.3.1.0
基本代码: file:///G:/work/进销存/仓库管理1208/仓库管理/KuCunGuanLi/bin/Debug/KuCunGuanLi.exe
----------------------------------------
System
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///F:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///F:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///F:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///F:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///F:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Data
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///F:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Transactions
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///F:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///F:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
mscorlib.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///F:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
System.Windows.Forms.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///F:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
CrystalDecisions.Windows.Forms
程序集版本: 10.2.3600.0
Win32 版本: 10.2.51014.0
基本代码: file:///F:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.Windows.Forms/10.2.3600.0__692fbea5521e1304/CrystalDecisions.Windows.Forms.dll
----------------------------------------
CrystalDecisions.Shared
程序集版本: 10.2.3600.0
Win32 版本: 10.2.51014.0
基本代码: file:///F:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.Shared/10.2.3600.0__692fbea5521e1304/CrystalDecisions.Shared.dll
----------------------------------------
CrystalDecisions.CrystalReports.Engine.resources
程序集版本: 10.2.3600.0
Win32 版本: 10.2.51014.0
基本代码: file:///F:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.CrystalReports.Engine.resources/10.2.3600.0_zh-CHS_692fbea5521e1304/CrystalDecisions.CrystalReports.Engine.resources.dll
----------------------------------------
************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。
例如:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
启用 JIT 调试后,任何无法处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。
----------------------------------
说明:报表的路经是没有问题的。