Crystal Report Print Error: the maximum report processing jobs limit configured by your system administrator has been reached

tex
 
on Oct 01, 2020 02:41 AM
7105 Views

When print crystal reprot too many times given me this message

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

Download FREE API for Word, Excel and PDF in ASP.Net: Download
tex
 
on Oct 01, 2020 04:31 AM

Thank you sir.

 

This the solution  

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

 

You can use this ReportFactory class for creating ReportClass object and don’t need to call explicitly dispose method on the page because ReportFactory class will automatically dispose it when count reach to 75.

 

The solution taken from 

http://geekswithblogs.net/technetbytes/archive/2007/07/17/114008.aspx