When we trying to print a lot of reports we get several error from the core of crystal reports.
We are using CrystalReports version 12,
.Net framework 3.5
Our application is windows application at client and asp.net web service at server running on IIS 7.5.
The flow of the process is:
The client request from the server ReportDocument object (the *.rpt document is stored in the DB), the client fill the ReportDocument with parameters, and send the report to printing.
To generate the report for fill it with data the server set a connection for the ReportDocument object.
If we print reports one by one, it’s work fine. But when we send few reports (the number is not constant) we starting to get errors like:
1. ExportToStream error: System.Web.Services.Protocols.SoapException: Server was unable to process request.
2. ExportToStream error: Load report failed.
After searching for solutions on web and SAP forums we made those actions:
1. Close() and Dispose() every ReportDocument object that opened.
2. Change the value of the “PrintJobLimit” key in the registry to “-1” (Registry path: HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 12.0\Report Application Server\InprocServer).
Unfortunately, those actions were unsuccessfully,
One more thing, we read that this issue is known among the crystal forums, but again we didn’t success to resolve our issue.
Here is the document which will give you a complete idea about the issue.
Here are some guidelines which will help in resolving the issue.
Few things to do are
- Use of sessions.
- Use of cleanup code (.Close, .Dispose)
- Appropriate report design to reduce the no. of print jobs.