The maximum number of report processing jobs configured by your system administrator has been reached.

I am using Crystal Report and I get an error:

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

I searched stackoverflow and found 2 topics:

But when I do as topic 1, change PrintJobLimit = -1, the error will happen anyway.

When I do as topic 2, I have not tested it yet, because my report should move between pages. To proceed, I have to save the report in the session:

    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();
    }

So, I cannot destroy reportDocument in unload because Session ["reportDocument"] will change to null

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

, , ?

+5
4

Pdf

, crvReport_Unload, , .

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

, .

+1

Crystal Report 11.5. , "HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports .NET Framework 4.0\Report Application Server\InprocServer, , .., , reportDocument with clone . /

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

, .:)

+1

There is no permanent solution. After changing the registry and code, the problem occurs within a few hours. Suggest changing RDL or RDLC

0
source

All Articles