本文介绍了如何在创建设置时部署水晶报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我创建了一个C#windows应用程序,其中包含vs2010中的水晶报告。 它在运行正常时成功运行。 但是,将该解决方案转换为安装文件后,当我在任何其他计算机上安装报告时无法正常工作,我收到错误 加载报告失败 我有错误对话框,点击详情显示如下 有关调用的详细信息,请参阅此消息的结尾 实时(JIT)调试而不是此对话框。 **************异常文本************** CrystalDecisions.Shared.CrystalReportsException:加载报告失败。 ---> System.Runtime.InteropServices.COMException:不支持的操作。由JRC引擎处理的文档无法在C ++堆栈中打开。 at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath,Int32 Options) at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath,Int32 Options) at CrystalDecisions.ReportAppServer .ReportClientDocumentWrapper.EnsureDocumentIsOpened() ---内部异常堆栈跟踪结束--- 在CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load (String filename,OpenReportMethod openMethod,Int16 parentJob) at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) at WindowsFormsApplication1.CRonMonth.button1_Click(Object sender,EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(消息&安培; m,MouseButtons按钮,Int32单击)在System.Windows.Forms.Control.WndProc(消息& m)在System.Windows.Forms.ButtonBase.WndProc(消息& m)在System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow .WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd,Int32 msg,IntPtr wparam,IntPtr lparam) **** **********已加载的程序集************** mscorlib 程序集版本:4.0.0.0 Win32版本:4.0。 30319.18051内容:FX45RTMGDR CodeBase:file:/// C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll ------------ ---------------------------- PensionManagementSystem 汇编版本:1.0.0.0 Win32版本: 1.0.0.0 CodeBase:file:/// C:/Users/Ahsan/AppData/Local/Apps/2.0/OENNOBA4.4D2/AQX46Q4X。 MP8 / pens..tion_95b2c7b852b851c5_0001.0000_4215969f0f69c206 / PensionManagementSystem.exe ---------------------------------- ------ System.Windows.Forms 汇编版本:4.0.0.0 Win32版本:4.0.30319.18046内置:FX45RTMGDR CodeBase:file:/// C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ------------ ---------------------------- System.Drawing 汇编版本:4.0.0.0 Win32版本:4.0.30319.18022内容:FX45RTMGDR CodeBase:file:/// C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- 系统汇编版本:4.0.0.0 Win32版本:4.0.30319.18045内容:FX45RTMGDR CodeBase:file:/// C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4 .0_4.0.0.0__b77a5c561934e089 / System.dll ----------------------- ----------------- System.Configuration 汇编版本:4.0.0.0 Win32版本:4.0.30319.18053建立者:FX45RTMGDR CodeBase:file:/// C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll ------- --------------------------------- System.Xml 汇编版本:4.0.0.0 Win32版本:4.0.30319.18053内容:FX45RTMGDR CodeBase:file:/// C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/ System.Xml.dll ---------------------------------------- System.Data 汇编版本:4.0.0.0 Win32版本:4.0.30319.18046内置:FX45RTMGDR CodeBase:file:/// C:/Windows/Microsoft.Net/ assembly / GAC_32 / System.Data / v4.0_4.0.0.0__b77a5c561934e089 / System.Data.dll ------------------------- --------------- System.Core 汇编版本:4.0.0.0 Win32版本:4.0.30319.17929 buil t by:FX45RTMREL CodeBase:file:/// C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll - --------------------------------------- System.Transactions 汇编版本:4.0.0.0 Win32版本:4.0.30319.17929内容:FX45RTMREL CodeBase:file:/// C:/Windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4。 0_4.0.0.0__b77a5c561934e089 / System.Transactions.dll ----------------------------------- ----- System.EnterpriseServices 汇编版本:4.0.0.0 Win32版本:4.0.30319.17929内容:FX45RTMREL CodeBase:file:/// C:/ Windows / Microsoft.Net / assembly / GAC_32 / System.EnterpriseServices / v4.0_4.0.0.0__b03f5f7f11d50a3a / System.EnterpriseServices.dll ------------------- --------------------- CrystalDecisions.Windows.Forms 汇编版本:13.0.2000.0 Win32版本:13.0.6.1027 CodeBase:file:/// C:/ Windows / assembly / GAC_MSIL / Cry stalDecisions.Windows.Forms / 13.0.2000.0__692fbea5521e1304 / CrystalDecisions.Windows.Forms.dll ---------------------------- ------------ CrystalDecisions.Shared 汇编版本:13.0.2000.0 Win32版本:13.0.6.1027 CodeBase:file:/// C:/Windows/assembly/GAC_MSIL/CrystalDecisions.Shared/13.0.2000.0__692fbea5521e1304/CrystalDecisions.Shared.dll ----------------------- ----------------- CrystalDecisions.ReportSource 汇编版本:13.0.2000.0 Win32版本:13.0.6.1027 CodeBase: file:/// C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportSource/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportSource.dll ------------------ ---------------------- System.Web 汇编版本:4.0.0.0 Win32版本:4.0.30319.18045内置作者:FX45RTMGDR CodeBase:file:/// C:/Windows/Microsoft.Net/assembly/GAC_32/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll - ----------------------- --------------- log4net 汇编版本:1.2.10.0 Win32版本:1.2.10.0 CodeBase:file:// /C:/Windows/assembly/GAC_32/log4net/1.2.10.0__692fbea5521e1304/log4net.dll -------------------------- -------------- CrystalDecisions.CrystalReports.Engine 汇编版本:13.0.2000.0 Win32版本:13.0.6.1027 CodeBase:file :/// C:/Windows/assembly/GAC_MSIL/CrystalDecisions.CrystalReports.Engine/13.0.2000.0__692fbea5521e1304/CrystalDecisions.CrystalReports.Engine.dll --------------- ------------------------- CrystalDecisions.ReportAppServer.CommLayer 汇编版本:13.0.2000.0 Win32版本:13.0.6.1027 CodeBase:file:/// C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.CommLayer/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.CommLayer.dll ---- ------------------------------------ CrystalDecisions.ReportAppServer.ClientDoc Assembly版本:13 .0.2000.0 Win32版本:13.0.6.1027 CodeBase:file:/// C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.ClientDoc/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.ClientDoc .dll ---------------------------------------- CrystalDecisions.ReportAppServer.DataDefModel 汇编版本:13.0.2000.0 Win32版本:13.0.6.1027 CodeBase:file:/// C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.DataDefModel /13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.DataDefModel.dll --------------------------------- ------- CrystalDecisions.ReportAppServer.CubeDefModel 汇编版本:13.0.2000.0 Win32版本:13.0.6.1027 CodeBase:file:/// C:/ Windows / assembly / GAC_MSIL / CrystalDecisions.ReportAppServer.CubeDefModel / 13.0.2000.0__692fbea5521e1304 / CrystalDecisions.ReportAppServer.CubeDefModel.dll ---------------------- ------------------ CrystalDecisions.Re portAppServer.ReportDefModel 汇编版本:13.0.2000.0 Win32版本:13.0.6.1027 CodeBase:file:/// C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.ReportDefModel/13.0 .2000.0__692fbea5521e1304 / CrystalDecisions.ReportAppServer.ReportDefModel.dll ----------------------------------- ----- CrystalDecisions.ReportAppServer.Controllers 汇编版本:13.0.2000.0 Win32版本:13.0.6.1027 CodeBase:file:/// C:/ Windows / assembly / GAC_MSIL / CrystalDecisions.ReportAppServer.Controllers / 13.0.2000.0__692fbea5521e1304 / CrystalDecisions.ReportAppServer.Controllers.dll ------------------------ ---------------- CrystalDecisions.ReportAppServer.DataSetConversion 汇编版本:13.0.2000.0 Win32版本:13.0.6.1027 CodeBase :file:/// C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.DataSetConversion/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.DataSetConve rsion.dll ---------------------------------------- ************** JIT调试************** 启用实时(JIT)调试,此应用程序或计算机(machine.config)的.config文件必须在system.windows.forms部分中设置 jitDebugging值。 应用程序也必须在启用调试的情况下编译。 例如: < configuration> < system.windows.forms jitDebugging =true/> < / configuration> 启用JIT调试后,任何未处理的异常将被发送到计算机上注册的JIT调试器,而不是由此对话框处理。 - 详情请见:http://codingresolved.com/discussion/886/how-to-deploy-crystal-report-project-in-vs2010-on-client-machine-#Item_5 请帮我解决这个问题。 解决方案 Crystal Reports:Fix forLoad report失败错误。 [ ^ ] I created a C# windows application which consists of crystal reports in vs2010.It runs successfully while run is normal.But, after converting that solution in to a setup file, when i install it on any other computer reports does not work, I got an error"load report failed" I have error dialogue box ,while click details displayed as follows See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.************** Exception Text **************CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---> System.Runtime.InteropServices.COMException: Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack. at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() --- End of inner exception stack trace --- at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) at WindowsFormsApplication1.CRonMonth.button1_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)************** Loaded Assemblies **************mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18051 built by: FX45RTMGDR CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll----------------------------------------PensionManagementSystem Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/Ahsan/AppData/Local/Apps/2.0/OENNOBA4.4D2/AQX46Q4X.MP8/pens..tion_95b2c7b852b851c5_0001.0000_4215969f0f69c206/PensionManagementSystem.exe----------------------------------------System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18046 built by: FX45RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll----------------------------------------System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18022 built by: FX45RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll----------------------------------------System Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18045 built by: FX45RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll----------------------------------------System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18053 built by: FX45RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll----------------------------------------System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18053 built by: FX45RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll----------------------------------------System.Data Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18046 built by: FX45RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll----------------------------------------System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll----------------------------------------System.Transactions Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll----------------------------------------System.EnterpriseServices Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll----------------------------------------CrystalDecisions.Windows.Forms Assembly Version: 13.0.2000.0 Win32 Version: 13.0.6.1027 CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.Windows.Forms/13.0.2000.0__692fbea5521e1304/CrystalDecisions.Windows.Forms.dll----------------------------------------CrystalDecisions.Shared Assembly Version: 13.0.2000.0 Win32 Version: 13.0.6.1027 CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.Shared/13.0.2000.0__692fbea5521e1304/CrystalDecisions.Shared.dll----------------------------------------CrystalDecisions.ReportSource Assembly Version: 13.0.2000.0 Win32 Version: 13.0.6.1027 CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportSource/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportSource.dll----------------------------------------System.Web Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18045 built by: FX45RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll----------------------------------------log4net Assembly Version: 1.2.10.0 Win32 Version: 1.2.10.0 CodeBase: file:///C:/Windows/assembly/GAC_32/log4net/1.2.10.0__692fbea5521e1304/log4net.dll----------------------------------------CrystalDecisions.CrystalReports.Engine Assembly Version: 13.0.2000.0 Win32 Version: 13.0.6.1027 CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.CrystalReports.Engine/13.0.2000.0__692fbea5521e1304/CrystalDecisions.CrystalReports.Engine.dll----------------------------------------CrystalDecisions.ReportAppServer.CommLayer Assembly Version: 13.0.2000.0 Win32 Version: 13.0.6.1027 CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.CommLayer/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.CommLayer.dll----------------------------------------CrystalDecisions.ReportAppServer.ClientDoc Assembly Version: 13.0.2000.0 Win32 Version: 13.0.6.1027 CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.ClientDoc/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.ClientDoc.dll----------------------------------------CrystalDecisions.ReportAppServer.DataDefModel Assembly Version: 13.0.2000.0 Win32 Version: 13.0.6.1027 CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.DataDefModel/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.DataDefModel.dll----------------------------------------CrystalDecisions.ReportAppServer.CubeDefModel Assembly Version: 13.0.2000.0 Win32 Version: 13.0.6.1027 CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.CubeDefModel/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.CubeDefModel.dll----------------------------------------CrystalDecisions.ReportAppServer.ReportDefModel Assembly Version: 13.0.2000.0 Win32 Version: 13.0.6.1027 CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.ReportDefModel/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.ReportDefModel.dll----------------------------------------CrystalDecisions.ReportAppServer.Controllers Assembly Version: 13.0.2000.0 Win32 Version: 13.0.6.1027 CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.Controllers/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.Controllers.dll----------------------------------------CrystalDecisions.ReportAppServer.DataSetConversion Assembly Version: 13.0.2000.0 Win32 Version: 13.0.6.1027 CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.DataSetConversion/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.DataSetConversion.dll----------------------------------------************** JIT Debugging **************To enable just-in-time (JIT) debugging, the .config file for thisapplication or computer (machine.config) must have thejitDebugging value set in the system.windows.forms section.The application must also be compiled with debuggingenabled.For example:<configuration> <system.windows.forms jitDebugging="true" /></configuration>When JIT debugging is enabled, any unhandled exceptionwill be sent to the JIT debugger registered on the computerrather than be handled by this dialog box.- See more at: http://codingresolved.com/discussion/886/how-to-deploy-crystal-report-project-in-vs2010-on-client-machine-#Item_5please help me to solve this problem. 解决方案 Crystal Reports: Fix for "Load report failed" error.[^] 这篇关于如何在创建设置时部署水晶报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-29 04:02