如何管理Crystal Report Dispose? [英] How to manage Crystal Report Dispose?

查看:61
本文介绍了如何管理Crystal Report Dispose?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio 2012版本的Crystal Reports 13中,有一个阈值可限制并发报告(其中还包括子报告)到整个计算机上的75个报告。这意味着如果给定服务器上有5个Web应用程序,则所有5个Web应用程序中所有打开的报告都计入75个报告限制。可能会导致出现以下错误没有足够的内存进行操作。或达到了由系统管理员配置的最大报告处理作业限制。



问题是报告没有被处置,并且会继续累积,直到达到75个限制为止击中。要解决此问题,必须尽早处理报告。这听起来很简单,但并不像看起来那样简单。根据生成报告的方式,有两种情况:第一种是生成PDF或Excel电子表格,第二种是使用Crystal Report Viewer。每个方案都有不同的生存期,在设计解决方案时需要考虑到这一点。

解决方案

已解决



CurrentJobLimit 是并发报告的计数器。

此计数器的管理不善,因此很容易增加,如果报告的实际数量较少,也是如此。



我解决了以编程方式关闭Crystal Report文档的问题

 受保护的void Page_Unload(对象发送者,EventArgs e)
{
CrystalReportViewer1.ReportSource.Close();
}






无论如何,注册表可以增加75:

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

(但这只是一种解决方法...。)


In the Visual Studio 2012 version of Crystal Reports 13 there is a threshold that throttles concurrent reports, this also includes sub reports, to 75 reports across a machine. This means if there are 5 web applications on a given server all opened reports across all 5 web applications counts toward the 75 report limit.

The error manifests itself in different ways and may result in the following errors "Not enough memory for operation." or "The maximum report processing jobs limit configured by your system administrator has been reached".

The problem is the reports are not disposed and they continue accumulate until the 75 limit is hit. To fix this issue, the reports have to be disposed of at the earliest possible time. This sounds simple, but is not as straightforward as it seems. Depending how the reports are generated there are two scenarios: First is generating PDF’s or Excel spreadsheets and the second is using the Crystal Report Viewer. Each scenario has a different lifetime, which we need to take into account when crafting our solution.

解决方案

SOLVED

CurrentJobLimit is a counter of concurrent reports.
This counter is not well managed, so it can easily increase, also if real number of reports is lower.

I solved the problem closing the Crystal Report Document programmatically.

protected void Page_Unload(object sender, EventArgs e)
 {
  CrystalReportViewer1.ReportSource.Close();
 }


Anyway, the number of 75 can be increased by registry:

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

(but this is just a workaround....)

这篇关于如何管理Crystal Report Dispose?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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