Skip to Content
0

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

Nov 14, 2016 at 07:42 PM

66

avatar image

Hello guys,

I'm working with c# windows application (wpf - not web application).

Application is developed in Visual Studio 2010.

Main purpose of my application is to print something, and I'm using crystal reports to do that.

But when I print one document after another I started facing issue:

Load report failed. COMException (0x80000000). The maximum report processing jobs limit configured by your system administrator has been reached.

I realized that is happening after 75 printed documents, so I chaged PrintJobLimit in registry of my computer from 75 to higher number, but that did not help me also, and I think that is not good solution!

I researched a lot but I could not fix this, this is my code and this is my edited function in a hope I might fix it, but unfortunately I did not :( :(

MY METHOD WHICH IS USED TO PRINT DOUCUMENT:

public static void PrintReportDocument_WithUsing(User _userId, DataSetReports ds)
{
string FilePath = AppDomain.CurrentDomain.BaseDirectory; //Path where I'm keeping my reports, ussualy it's in ProjectName\bin\Debug folder..

using (ReportDocument rpt_documentOne = new rpt_MyReport())
            {
           rpt_documentOne.FileName = path + "rpt_MyReport.rpt";
         ((TextObject)((rpt_MyReport)rpt_documentOne).Section4.ReportObjects["txtThanks"]).Text = Util.ThankYouMessage;
         ((TextObject)((rpt_MyReport)rpt_documentOne).Section4.ReportObjects["txtMessage"]).Text = Util.Info;
         ((TextObject)((rpt_MyReport)rpt_documentOne).Section4.ReportObjects["txtWirelessKEY"]).Text = Util.WirelessKEY;
         ((TextObject)((rpt_MyReport)rpt_documentOne).Section4.ReportObjects["txtWirelessSSID"]).Text = Util.WirelessURL;
        if (_userId != null)
        ((TextObject)((rpt_MyReport)rpt_documentOne).Section4.ReportObjects["MessageUser"]).Text = "VIP user: " + _userId.Name + ";+ "Discount: " + _userId.Percent.ToString() + "%";


                rpt_documentOne.SetDataSource(ds);
                PrintReportDocument_C(rpt_documentOne); 

// I added this also, even if my document is created into using statement..
                            rpt_documentOne.Close();


                            rpt_documentOne.Clone();
                            rpt_documentOne.Dispose();


                            GC.Collect();
                            GC.WaitForPendingFinalizers();



            

     }

 }

So guys if anyone know how could I solve this I would appreciate that so much!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Jürgen Bauer Nov 15, 2016 at 12:16 PM
0

Maybee you should remove the "rpt_documentOne.Clone();"

Share
10 |10000 characters needed characters left characters exceeded
Don Williams
Nov 15, 2016 at 02:48 PM
0

Hi Eldin,

That is odd, why are you cloning the report and then closing it. I've never seen anyone do that before.

Problem is the WPF viewer will not let you close the report without replacing it with another one.

I've never tested opening 75 jobs with the WPF app., when I get time I'll try it.

Using a Windows Form is much more robust and tested so you may want to convert to it.

Don

Share
10 |10000 characters needed characters left characters exceeded