1

I am using Crystal Reports 13.5 in ASP.NET web forms app. I tried putting the Close() and Dispose() calls in the Page_Unload method, but it did not help.

After 75 reports, I start getting error:

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

Should I purchase a license for Business Object?

zed
  • 2,298
  • 4
  • 27
  • 44
Ajay Kumar
  • 1,154
  • 2
  • 10
  • 24
  • please see the below question in stack overflow http://stackoverflow.com/questions/9579914/crystal-reports-exception-the-maximum-report-processing-jobs-limit-configured-b – Deepak Joshi Sep 07 '15 at 11:57
  • still facing the same issue after calling `dispose()` and `close()` on page unload – Ajay Kumar Sep 07 '15 at 12:03
  • I think this link will work for you http://jepsonsblog.blogspot.in/2010/12/maximum-report-processing-jobs-limit.html Please try this and let me know. Thank you – Deepak Joshi Sep 07 '15 at 12:08
  • Did not worked for me. Should I purchase Business object? – Ajay Kumar Sep 09 '15 at 07:35
  • Hi Ajay, Have you change registry key?. This problem quite easily, by altering one value in the registry: HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.5\Report Application Server\InprocServer\PrintJobLimit – Deepak Joshi Sep 09 '15 at 09:14

3 Answers3

1

It worked for me by Disposing the report and then calling GC.Collect(). Only Disposing the object wasn't enough in my case. Check this for full details.

EDIT: As per Div's comment, here's the solution from the link:

  • Load report
  • Assign to Viewer Control
  • Show Report in Viewer Control
  • Close Viewer Control and Unload (completely)
  • Then close/dispose/gc.collect outside of any viewer control code
Matheus Lemos
  • 578
  • 4
  • 13
  • “While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.” – Divyang Desai Nov 14 '16 at 16:11
  • While it does fix the problem calling Dispose, it's not a quick action. If you are chaining individual reports together like myself and placing them in a PDF format, it means waiting an extra second+ per report. This is quite frustrating. I'm unsure of what SAP is doing that it can't work like other reporting interfaces without arbitrary limits. If I'm reusing over and over the same CrystalReport document object, it shouldn't need to get Disposed in between. – Keith Dec 05 '17 at 17:19
  • I agree, it's indeed quite frustrating. My problem wasn't related to chaining, but I needed to generate 7000+ reports per day, so working with the print job limit was not a good option, but disposing was acceptable in my case. – Matheus Lemos Jan 17 '18 at 18:51
0
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)
        {
 
            //75 is my print job limit.
            if (reportQueue.Count > 75) ((ReportClass)reportQueue.Dequeue()).Dispose();
            return CreateReport(reportClass);
        }
    }
}
Code
  • 679
  • 5
  • 9
-1

Crystal print engine is designed with 75 as a default print job limit. Once this limit exceeds, above issues start to appear.

This problem quite easily, by altering one value in the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Report Application Server\InprocServer

For more information please look into below link

http://scn.sap.com/community/crystal-reports-for-visual-studio/blog/2014/04/25/what-exactly-is-maximum-report-processing-job-limit-for-crystal-reports

Deepak Joshi
  • 1,036
  • 7
  • 17
  • I changed the PrintJobLimit but it does not seem to have an effect. At least for a running IIS pool. – Kissaki Jan 21 '21 at 14:37