cancel
Showing results for 
Search instead for 
Did you mean: 

The maximum report processing jobs limit configured by your system admin...

Former Member
0 Kudos

Hi There,

I have two questions about this error.

1) How do you get rid of it after it happened. I had to reboot.

2) What's the best way to dispose of the reportdocument object.

I tried the code below, but it doesn't work:

protected void Page_UnLoad(object sender, EventArgs e)

{

rdoc.Close();

rdoc.Dispose();

GC.Collect();

}

Thanks for help on previous issues.

Paul O

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Paul,

Have a look to this thread:

[;

Regards,

Shweta

Answers (1)

Answers (1)

former_member208657
Active Contributor
0 Kudos

1. Increase Print Job Limit

You can try increasing your print job limit. The default 75 jobs was chosen because it provided the best results with best server performance. Increasing this number can degrade server performance.

- Open the registry editor by going to Start > Run. Then type in regedit.exe and click Ok.

- Find this key HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.5\Report Application Server\InprocServer\PrintJobLimit

- Increase the print job limit. You may want to try something like 125 or 150

Keep in mind this may only delay the error you are getting. If you are not cleaning up correctly then you'll just get the error at a later time.

2. Cleanup Code

Your clean up code looks okay as long as you are not putting your ReportDocument in session. I would need to know more about your code before I can say if it is correct or not.

- Where are you loading your ReportDocument?

- Are you putting the ReportDocument in Session or Cache?

- What "doesn't work" with the code you posted? Do you get the same error or a new one?

Former Member
0 Kudos

Thanks for both replies.

I don't have the opportunity to change the registry on the server. The Page_Unload code seems to be the key. The problem is when I click next page I get the error:

"Object reference not set to an instance of an object." above the report viewer.

Here's my Page_Init:

protected void Page_Init(object sender, EventArgs e)

{

if (!Page.IsPostBack)

{

ScriptManager mstScriptManager;

mstScriptManager = (ScriptManager)Master.FindControl("ScriptManager1");

mstScriptManager.RegisterPostBackControl(CRViewer);

}

//pbo 9/19/2008

if (this.Page.IsPostBack)

{

if (Session.Contents["rdoc"] != null)

{

//added sap suggesion

rdoc = (ReportDocument)Session.Contents["rdoc"];

CRViewer.ReportSource = rdoc;

}

}

}

I load the report in Page_Load, but do not reload it when on postback:

if (reportType == "ALL" & !IsPostBack)

{

rdoc = (ReportDocument)Session["rdoc"];

if (rdoc == null)

{

rdoc = new ReportDocument();

}

else

{

rdoc.Close();

rdoc.Dispose();

rdoc = new ReportDocument();

}

reportPath = Server.MapPath("reportNamerpt");

rdoc.Load(reportPath);

rRisksTableAdapters.Risks_ALLTableAdapter cta = new rRisksTableAdapters.Risks_ALLTableAdapter();

rdoc.SetDataSource((DataTable)cta.GetData(Convert.ToInt16(SessionManager.LOGGED_IN_USER_COMPANYID())));

rdoc.SetDatabaseLogon(ConfigurationManager.AppSettings["username"].ToString(), ConfigurationManager.AppSettings["pwd"].ToString());

Session["rdoc"] = rdoc;

CRViewer.ReportSource = rdoc;

}

I think I am following all the standard stuff but am obviously missing something.

former_member208657
Active Contributor
0 Kudos

The problem is you've Closed and Disposed of your ReprotDocument in session. When you attempt to postback there is nothing there for the CrystalReportViewer to reference. In your case you need to clean up somewhere else. Try cleaning up in a button click event, or capture when your user closes the browser window and clean up the session vars.

You could also clean up in the global.asax file in the Session_End().

Former Member
0 Kudos

So I'll move the clean up to the Session_OnEnd

Is the code below the proper way to close?

rdoc.close();

rdoc.dispose();

GC.Collect();

Also, is there a way to check how many "report processing jobs" are loaded or a way to clean them out other than restarting IIS?

Thanks again.

Paul O

former_member184995
Active Contributor
0 Kudos

There is no way to find out how many jobs are in use as far as I know.

They have to time out if not cleaned up properly. The code snipped you posted looks good.

I have not see anyone use Session_OnEnd before so let us know if that does it and how you implemented it.

If it works it will help others with the same issue.

Typically you would have to use a button click or some such to force the clean up to fire.