Solved

Crystal Reports maximum report processing jobs limit error

Posted on 2016-08-17
2
33 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
Comment Utility
Is this being handled enough in the code I provided?
0
 
LVL 18

Accepted Solution

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

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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

11 Experts available now in Live!

Get 1:1 Help Now