5

I am using Crystal Report and I receive error :

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

I've searched stackoverflow and found 2 topic:

  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

But when i do as topic 1, change PrintJobLimit =-1, the error still happen.

When i do as topic 2, I haven't test yet because my report need navigate between pages. To navigate, I have to save report in 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 dispose reportDocument in unload because Session["reportDocument"] change to null

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

So, how can I do navigating between pages in report, but I doesnot receive the error ?

Thank you very much

Community
  • 1
  • 1
user418727
  • 93
  • 1
  • 1
  • 5

4 Answers4

2

I found this link Pdf file

So, I don't close and dispose document in crvReport_Unload, but i close and dispose it when i redirect to another page.

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

And the error still happends but less offen.

user418727
  • 93
  • 1
  • 1
  • 5
1

I was facing the same issue in Crystal report version 11.5. After a lot of search I found different solutions like "HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Report Application Server\InprocServer that says increase you print job limit etc but none of them worked for me. Then I just disposed off my reportDocument with clone and that worked like a charm. In my case after printing/generation report I did this

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

Hope this will help you. :)

Nauman Zubair
  • 1,208
  • 15
  • 27
0

Morning, Have you tried anything from here: http://social.msdn.microsoft.com/forums/en/vscrystalreports/thread/208525b2-94cd-4af6-9c5a-015e243b3092/

Jeremy Peck
  • 156
  • 1
  • 7
0

There is No permanent solution. After changing Registry and Code, problem arise within few hours. Suggesting to change RDL or RDLC