Solved

Crystal Reports maximum report processing jobs limit error

Posted on 2016-08-17
2
41 Views
Last Modified: 2016-08-17
We have an ASP.NET C# 4.5 Application on a Windows Server 2012 server.  This is a new server for this application and we encountered this max job report error late into the first day of use. We have CR XI in place on the server.
We put a couple of lines in place to help cleanup the files. Does anyone have any suggestions on the code attached to help our cause?

 
            case "TravelerRpt":    
         NewTravelerRpt oTraveler = new NewTravelerRpt();
                    oTraveler.SetDataSource(Session["RptData"]);
                    CrystalReportViewer1.ReportSource = oTraveler;
                   

                    try
                    {
                       byte[] byteArray = null;

                       
                        var xStream = oTraveler.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
                       
                        byteArray = new byte[xStream.Length];
                        xStream.Read(byteArray, 0, Convert.ToInt32(xStream.Length - 1));
                        Response.ClearContent();
                        Response.ClearHeaders();
                        Response.ContentType = "application/pdf";
                        Response.BinaryWrite(byteArray);
                        Response.Flush();
                        Response.Close();
                        CrystalReportViewer1.Visible = true;
                       

               
                    }

                    catch (Exception ex)
                    {
                        this.txtError.Text = ex.ToString();
                        this.txtError.Visible = true;
                    }
                    finally
                    {
                        oTraveler.Dispose();
                        Session["ReportData"] = null;
                    }
                   
                    break;
0
Comment
Question by:ITMikeK
2 Comments
 

Author Comment

by:ITMikeK
ID: 41759874
Is this being handled enough in the code I provided?
0
 
LVL 18

Accepted Solution

by:
vasto earned 500 total points
ID: 41759887
You need to close the report before to dispose it.
finally
                    {
                        oTraveler.Close();
                        oTraveler.Dispose();
                        Session["ReportData"] = null;
                    }
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now