?
Solved

Crystal Reports maximum report processing jobs limit error

Posted on 2016-08-17
2
Medium Priority
?
69 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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Integration Management Part 2
Suggested Courses

864 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