Crystal Reports异常:已达到系统管理员配置的最大报告处理作业限制 [英] Crystal Reports Exception: The maximum report processing jobs limit configured by your system administrator has been reached
问题描述
我遇到了一个很麻烦的问题,在ASP.NET应用程序中同时查看同一个报表多次同时我有这个异常:
I'm facing a very buggy issue, in ASP.NET application after viewing the same report many times simultaneously I got this exception:
系统配置的最大报表处理作业限制
管理员已达到
The maximum report processing jobs limit configured by your system administrator has been reached.
等我知道有吨
-
我把ReportDocument.Close(); ReportDocument.Dispose();在CrystalReportViewer_Unload事件中,仍然抛出异常。
I put ReportDocument.Close(); ReportDocument.Dispose(); in CrystalReportViewer_Unload event, and still throw the exception.
私有子CrystalReportViewer1_Unload(ByVal sender As Object,ByVal e As System.EventArgs)处理CrystalReportViewer1。卸载
reportFile.Close()
reportFile.Dispose()
GC.Collect()
End Sub
我在 HKEY_LOCAL_MACHINE\SOFTWARE\SAP中编辑PrintJobLimit注册表.NET Framework 4.0的应用程序BusinessObjects \ Crystal报表\Report应用程序服务器\InprocServer
和 HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects \ Crystal报表.NET Framework 4.0 \Report应用程序服务器\Server
为-1甚至到9999,仍然抛出异常。
I edit the PrintJobLimit registry in HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Report Application Server\InprocServer
and HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Report Application Server\Server
to -1 even to 9999, and still throw the exception.
以下是我调用我的报告的代码片段:
Here is the code snippet where I call my report:
Table_Infos = New TableLogOnInfos()
Table_Info = New TableLogOnInfo()
Con_Info = New ConnectionInfo()
With Con_Info
.ServerName = ConfigurationManager.AppSettings("server_name")
.DatabaseName = ConfigurationManager.AppSettings("DB")
.UserID = user_name
.Password = pass_word
.Type = ConnectionInfoType.SQL
.IntegratedSecurity = False
End With
Table_Info.ConnectionInfo = Con_Info
If Session("recpt_lang") = "Arabic" Then
reportFile.Load(Server.MapPath("/Reports/") & "collectrecpt_new_ar.rpt")
ElseIf Session("recpt_lang") = "English" Then
reportFile.Load(Server.MapPath("/Reports/") & "collectrecpt_new.rpt")
End If
For Each mytable In reportFile.Database.Tables
mytable.ApplyLogOnInfo(Table_Info)
Next
CrystalReportViewer1.ReportSource = reportFile
CrystalReportViewer1.SelectionFormula = Session("SelectionForumla")
CrystalReportViewer1 = Nothing
推荐答案
我建议在卸载过程之外移动您的关闭/ dispose / gc.collect代码。换句话说:
I would recommend moving your close/dispose/gc.collect code outside of that unload process. In other words:
- 载入报告
- 指派给查看者控制
- 在查看者控制中显示报告
- 关闭查看者控制和卸载(完全)
- 然后关闭/处理/ gc.collect查看者控件代码
- Load report
- Assign to Viewer Control
- Show Report in Viewer Control
- Close Viewer Control and Unload (completely)
- Then close/dispose/gc.collect outside of any viewer control code
我的猜测是当报表正在清理时,查看器控件未完全关闭。
My guess is the viewer control is not completely closed when the report is being cleaned up.
Crystal是一个内存密集型过程,非常简单。
Crystal is a very memory intensive process and very finicky.
这篇关于Crystal Reports异常:已达到系统管理员配置的最大报告处理作业限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!