【问题标题】:The maximum report processing jobs limit configured by your system administrator has been reached已达到系统管理员配置的最大报表处理作业限制
【发布时间】:2015-07-30 13:39:34
【问题描述】:

我正在使用 Crystal Report,但收到错误消息:

The maximum report processing jobs limit configured by your system administrator has been reached

我搜索了stackoverflow并找到了2个主题:

  1. Crystal Reports Error: The Maximum Report Processing Jobs Limit
  2. Crystal Reports Exception: The maximum report processing jobs limit configured by your system administrator has been reached

但是当我做主题1时,改变PrintJobLimit =-1,错误仍然发生。

当我做主题 2 时,我还没有测试,因为我的报告需要在页面之间导航。要导航,我必须在会话中保存报告:

    ReportDocument reportDocument = null;
    protected override void OnInit(EventArgs e)
    {
        if (IsPostBack && Session["reportDocument"] != null)
        {
            reportDocument = (ReportDocument)Session["reportDocument"];
            crvReport.ReportSource = reportDocument;
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        reportDocument = new ReportDocument();
        Session["reportDocument"] = reportDocument;
        crvReport.ReportSource = reportDocument;

        reportDocument.Load(Server.MapPath("~/files/Users.rpt"));
        reportDocument.SetDatabaseLogon("******", "******", "*.*.*.*", "*****");
        reportDocument.VerifyDatabase();

        crvReport.DataBind();
    }

所以我无法在卸载时处理 reportDocument,因为 Session["reportDocument"] 更改为 null

    protected void crvReport_Unload(object sender, EventArgs e)
    {
        if (reportDocument != null)
        {
            reportDocument.Close();
            reportDocument.Dispose();
            reportDocument = null;
            GC.Collect();
        }
    }

那么,如何在报告中的页面之间导航,但我没有收到错误消息?

非常感谢

【问题讨论】:

    标签: crystal-reports


    【解决方案1】:

    我找到了这个链接Pdf file

    所以,我不会在 crvReport_Unload 中关闭和处置文档,而是在重定向到另一个页面时关闭并处置它。

    //OnRedirect
    ReportDocument reportDocument = (ReportDocument)Session["reportDocument"];
    reportDocument.Close();
    reportDocument.Dispose();
    reportDocument = null;
    GC.Collect();
    

    而且错误仍然发生,但不那么冒犯了。

    【讨论】:

      【解决方案2】:

      我在 Crystal 报表 11.5 版中遇到了同样的问题。经过大量搜索后,我发现了不同的解决方案,例如 "HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Report Application Server\InprocServer 说增加了打印作业限制等,但没有一个为我工作。然后我刚刚处理掉了我的reportDocument with clone,这就像一个魅力。就我而言,在打印/生成报告后我这样做了

      reportDocument.Close(); 
      reportDocument.Clone(); 
      reportDocument.Dispose(); 
      reportDocument = null;
      GC.Collect();
      GC.WaitForPendingFinalizers();
      

      希望这会对您有所帮助。 :)

      【讨论】:

        【解决方案3】:

        【讨论】:

          【解决方案4】:

          没有永久的解决方案。 更改注册表和代码后,几个小时内就会出现问题。 建议更改 RDL 或 RDLC

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 2012-03-23
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 2012-05-29
            • 2011-08-03
            • 2015-08-20
            • 2019-08-03
            相关资源
            最近更新 更多