Maximum report processing jobs limit configured by your system administrator has been reached Print

  • 0

While trying to open a report, you may receive an error similar to the following:

"Maximum report processing jobs limit configured by your system administrator has been reached"

This error actually means that Crystal Report print job limit has been reached and you should handle this problem by increasing the job limit in the registry. The basic reason of this problem is Garbage Collector (GC) cannot clear the reference of report document in their collection process its only clear report viewer. The most likely cause for this error is code that does not call myreport.close() followed by myreport.dispose() in your code.

a nice way to implement this solution is to test the number of reports in the reportQueue before creating a new report. If the count exceeds some predefined limit of your choosing, then the Deque().Dispose() methods shoould be invoked, as follows:

using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using CrystalDecisions;
using CrystalDecisions.CrystalReports;
using CrystalDecisions.CrystalReports.Engine; namespace Test.Utilities
{
public class ReportFactory
{
protected static Queue reportQueue = new Queue(); protected static ReportClass CreateReport(Type reportClass)
{
object report = Activator.CreateInstance(reportClass);
reportQueue.Enqueue(report);
return (ReportClass)report;
} public static ReportClass GetReport(Type reportClass)
{
//let's assume that 50 is the print job limit.
if (reportQueue.Count > 50) ((ReportClass)reportQueue.Dequeue()).Dispose();
return CreateReport(reportClass);
}
}
}


Was this answer helpful?

« Back