CrystalReport负荷报告失败 [英] CrystalReport Load report failed

查看:191
本文介绍了CrystalReport负荷报告失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Windows应用程序项目(C#和.NET 2.0)所使用的Crystal Report 2008年。但我有时会收到错误(似乎无意地)装载报告。这错误是:

I have a windows application project (C# and .NET 2.0) that used Crystal Report 2008. But I get error sometimes (it seems accidentally) in loading report. That error is:

CrystalDecisions.Shared.CrystalReportsException: Load report failed.
System.Runtime.InteropServices.COMException (0x8000020D): Unable to load report.
   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 SIA.DataTransfer.Forms.frmReport.GetStateReport(Int32 transferType)

请指导我。我该如何解决这个问题呢?

please guide me. How can I solve this problem?

推荐答案

如果您的应用程序是一个独立的可执行文件,然后生成此错误,因为你没有正确关闭您的报表对象,当你用它做。您可能会看到运行,你的应用程序与大量用户同时访问你的网站的ASP.NET应用程序,这个错误。

If your application is a standalone executable then this error is generated because you are not properly closing your report object when you are done with it. You might see this error running you application as an ASP.NET app with a lot of users accessing your site simultaneously.

您可能会导致通过调整这个注册表键,会出现错误越早:

You can cause the error to appear sooner by tweaking this registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\CRYSTAL DECISIONS\10.0\REPORT APPLICATION SERVER\SERVER\PrintJobLimit

它通常默认为75。为了调试,你可以将其设置为较小的值,并导致错误出现越早。

It normally is defaulted to 75. For debugging you can set it to a smaller value and cause the error to appear sooner.

当您使用报表对象都做了,叫.Close()方法,将清理所使用的非托管资源。

When you are done using a report object, call the .Close() method which will clean up the unmanaged resources used.

有那些提到的设置更改为-1。这是一个错误,它只会导致其他问题的一个应用程序是长时间运行。这一过程将最终耗尽资源,启动的方式,将更加难以解决的失败。

There are those that mention to change the setting to -1. This is a mistake, it will only cause other problems for an application that is long running. The process will eventually run out of resources and start to fail in ways that will be even more difficult to troubleshoot.

这篇关于CrystalReport负荷报告失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆