In my java application we are having crystal report implementation for reporting purpose. While printing a report in my application we have the error like
"The maximum report processing jobs limit configured by your system administrator has been reached."
The following are the implementation.
The ReportServerFactory.java file is the factory for creating report server
public final class ReportServerFactory
{
/**
* Constructor for ReportServerFactory
*/
private ReportServerFactory()
{
}
public static ReportServer createReportServer(String keyClassName)
throws BusinessServiceException
{
try
{
return (ReportServer) Class.forName(keyClassName).newInstance();
}
catch (Exception e)
{
String[] params = { " ", e.getMessage()};
throw new BusinessServiceException(
ReportModuleErrorCodes.ERROR_UNABLE_INSTANTIATE_REPORT_SERVER,
params);
}
}
}
We have a java file called CrystalReportServer.java. In that we have the following api. This api have been called from service bean.
public ReportViewerResponse generatePrintReport(final ReportPrintRequest reportPrintRequest,
final ReportRuntimeSQLCriteria runtimeCriteria, final TransactionToken txToken)
throws BusinessServiceException
{
viewerResponse = new ReportViewerResponse();
ReportClientDocument reportClientDoc =
openReport(reportPrintRequest, runtimeCriteria, txToken);
try
{
PrintReportOptions printOptions = new PrintReportOptions();
printOptions.setPrinterName(reportPrintRequest.getPrinterName());
printOptions.setJobTitle(reportPrintRequest.getPrinterJobTitle());
PrinterDuplex duplex = PrinterDuplex.from_int(reportPrintRequest.getPrinterDuplex());
printOptions.setPrinterDuplex(duplex);
if (reportPrintRequest.getPrinterPaperSource() > 0)
{
PaperSource paperSource =
PaperSource.from_int(reportPrintRequest.getPrinterPaperSource());
printOptions.setPaperSource(paperSource);
}
PaperSize size = PaperSize.from_int(reportPrintRequest.getPrinterPaperSize());
printOptions.setPaperSize(size);
if (reportPrintRequest.getPrinterNumberOfCopies() > 1)
{
printOptions.setNumberOfCopies(reportPrintRequest.getPrinterNumberOfCopies());
}
else
{
printOptions.setNumberOfCopies(1);
}
printOptions.setCollated(reportPrintRequest.isPrinterCollated());
PrintReportOptions.PageRange printPageRange =
new PrintReportOptions.PageRange(reportPrintRequest.getPrinterMinRange(),
reportPrintRequest.getPrinterMaxRange());
printOptions.addPrinterPageRange(printPageRange);
reportClientDoc.getPrintOutputController().printReport(printOptions);
reportClientDoc.getReportSource().dispose();
reportClientDoc.close();
reportClientDoc = null;
}
catch (ReportSDKPrinterException eX)
{
}
catch (ReportSDKException eX)
{
}
return viewerResponse;
}
The above API is calling the openReport(reportPrintRequest, runtimeCriteria, txToken). This openReport api contains the code for preparing the
client document such as connection, report name, filters and some more information.
Please help me to resolve this issue.
Edited by Shivacon - 25 Sep 2009 at 1:55am