Solved

Crystal Reports maximum report processing jobs limit error

Posted on 2016-08-17
2
48 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

856 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