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

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

问题描述

在 Crystal Reports 13 的 Visual Studio 2012 版本中,有一个阈值可将并发报表(这也包括子报表)限制为跨计算机的 75 个报表.这意味着,如果给定服务器上有 5 个 Web 应用程序,则所有 5 个 Web 应用程序中所有打开的报告都计入 75 个报告限制.

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".

问题是报告没有被处理,它们会继续累积,直到达到 75 个限制.要解决此问题,必须尽早处理报告.这听起来很简单,但并不像看起来那么简单.根据生成报告的方式,有两种情况:第一种是生成 PDF 或 Excel 电子表格,第二种是使用 Crystal Report Viewer.每个场景都有不同的生命周期,我们在制定解决方案时需要考虑到这一点.

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.

推荐答案

已解决

CurrentJobLimit 是并发报告的计数器.
此计数器管理不善,因此很容易增加,即使实际报告数量较少.

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.

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

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

<小时>

反正75的个数可以通过registry来增加:


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

   HKEY_LOCAL_MACHINESOFTWARECRYSTAL DECISIONS10.0REPORT APPLICATION SERVERSERVERPrintJobLimit

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

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

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

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