已达到系统管理员配置的最大报告处理作业限制

use*_*727 5 crystal-reports

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

The maximum report processing jobs limit configured by your system administrator has been reached
Run Code Online (Sandbox Code Playgroud)

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

  1. Crystal Reports错误:最大报表处理作业限制
  2. Crystal Reports异常:已达到系统管理员配置的最大报表处理作业限制

但当我做主题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();
    }
Run Code Online (Sandbox Code Playgroud)

因此,我无法在卸载时释放reportDocument,因为Session ["reportDocument"]更改为null

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

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

非常感谢你