• Status: Solved
  • Priority: High
  • Security: Public
  • Views: 114
  • Last Modified:

ASP.NET : Maximum Report Limit Exceeded

Dear Experts,

Can anyone guide me on the error?

"Maximum report processing jobs limit configured has been reached"

I got the following code from the internet but I don't know where to use it. Please guide.

Imports System.Collections
Imports System.Collections.Generic
Imports System.Text
Imports CrystalDecisions
Imports CrystalDecisions.CrystalReports
Imports CrystalDecisions.CrystalReports.Engine

Namespace Test.Utilities
	Public Class ReportFactory
		Protected Shared reportQueue As New Queue()

		Protected Shared Function CreateReport(reportClass As Type) As ReportClass
			Dim report As Object = Activator.CreateInstance(reportClass)
			Return DirectCast(report, ReportClass)
		End Function

		Public Shared Function GetReport(reportClass As Type) As ReportClass

			'75 is my print job limit.
			If reportQueue.Count > 75 Then
				DirectCast(reportQueue.Dequeue(), ReportClass).Dispose()
			End If
			Return CreateReport(reportClass)
		End Function
	End Class
End Namespace

Open in new window

D Patel
D Patel
D Patel
  • 3
  • 2
2 Solutions
Dorababu MSenior Software EngineerCommented:
D PatelD Patel, Software EngineerAuthor Commented:
That understood...

But how do I write code so that it clears the cache at 75 job reaches.

Where should I write the above code and from when do I call it?
Dorababu MSenior Software EngineerCommented:
What I see is you need to do the following every time for crystal report

Load report,
Assign it 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

D PatelD Patel, Software EngineerAuthor Commented:
I have applied the same to all pages where crystal report viewer control lies at Page_Unload event.

But still the issue is not resolved.
Pravin AsarPrincipal Systems EngineerCommented:
Also look at the timeout setting for the request. May be request is reaching limit

D PatelD Patel, Software EngineerAuthor Commented:
Thanks for your support.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now