on 09-09-2008 12:45 AM
I am getting this: "The maximum report processing jobs limit configured by your system administrator has been reached."
I have upped the limit to -1 in the registry and I am forcing a soft reset of the IIS server every hour. This is holding it at bay but is not an acceptable solution. I had tried using the following code to handle this problem in the page_unload event:
Try
rptDoc.Close()
rptDoc.Dispose()
GC.WaitForPendingFinalizers()
GC.Collect()
Catch ex As Exception
Throw ex
End Try
Which does appear to close the report. But, when you go to export the doc(I have the print option turned off) you get Object reference not set to an instance of an object. Which makes perfect sense because you have closed and disposed of the object in the page_unload event which fires every time the web page is rendered.
I am using VS2005 with CR xi r2 sp2 on IIS 6.0. Any one have any idea how to deal with this problem. I have spent 2 days scanning the web and nothing is working.
Thanks,
Dan...
Hi Dan,
If reports have sub reports, then they will also consume print limit. For every report, sub reports, seperate processing is done and it increases the print limit.
As you have tried close() and dispose(), I'd suggest you to modify registry settings as described below. It seems that report processing and consume is quiet more at your side, causing this issue. You may need to upgrade to CR server, if this is the scenario.
To Increase the print job limit to 300
1.Click Start > Run. The Run dialog box appears.
2.Type u201Cregeditu201D in the Open field. Click OK. The Registry Editor appears.
3.Navigate to the appropriate registry key value:
HKEY_LOCAL_MACHINE\SOFTWARE\BUSINESS OBJECTS\SUITE 11.5\REPORT APPLICATION SERVER\SERVER\PrintJobLimit
Setting beyond 300 may impact the performance.
I hope it helps.
Regards,
Arjun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
I also google from this site and other sites. The increasing of printjoblimit is not good solution. Also the report.close and dispose at Page_Unload does not work every time.
The following solution (From http://geekswithblogs.net/technetbytes/archive/2007/07/17/114008.aspx) works for me.
public class ReportFactory
{
protected static Queue reportQueue = new Queue();
protected static int iMaxCount = 75;
protected static ReportDocument CreateReport(Type reportClass)
{
object report = Activator.CreateInstance(reportClass);
reportQueue.Enqueue(report);
return (ReportDocument)report;
}
public static ReportDocument GetReport(Type reportClass)
{
if (reportQueue.Count > iMaxCount)
{
((ReportDocument)reportQueue.Dequeue()).Close();
((ReportDocument)reportQueue.Dequeue()).Dispose();
GC.Collect();
}
return CreateReport(reportClass);
}
}
//The following is to call the function
CrystalDecisions.CrystalReports.Engine.ReportDocument crReportDocument = new ReportDocument();
crReportDocument = ReportFactory.GetReport(crReportDocument.GetType());
Regards,
Thant Zin (UCSM)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the suggestions and the registry setting. I have increased it to 150 which helped. What I did that seemed to solve the problem is:
In the page_unload
Try
rptDoc.Close()
rptDoc.Dispose()
GC.WaitForPendingFinalizers()
GC.Collect()
Catch ex As Exception
Throw ex
End Try
Then I set a session varible equal to the name of the report I am running. (Not the object) Anything regarding the reportviewer or changing reports fires a postback. I check for postback and if true I run the report in the session varible again. I also trap for expired session and msgbox them that then need reselect the report.
It seems horribly inefficent but it with raising the print limit seems to have solved the problem.
Thanks for the help.
Dan...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dan, you are correct that the solution is not the best. The 75 job limit is an optimal setting that considers possible code, usage, harware and other variables that may affect performance. However, it does appear that you are simply limiting out the product. You can use the Crystal Reports server if the load will be increasing and beyond that you have the Business Objects Enterprise.
This presentation may be of help:
https://boc.sdn.sap.com/node/972
Ludek
Hi Dan,
If you can not close and dispose in the page unload you will need to put the close and dispose in a location that you can force them to fire.
Something like a button click or some such that you force the user to use to leave the report page.
If they close the page by clicking the X button on the browser then it will never fire and the print jobs will not be cleaned up so you need to make sure they do not close it in that manner.
Best Regards,
Jason
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.