Hi,
I have many reports in Crystal Reports X11 that I put into
java using the JRC and exporting them to PDF and those work ok, but I tried to add a new report using subreports like this:
ISubreportClientDocument subRep = reportClientDoc.getSubreportController().getSubreport(rpts.get(i).toString());
ResultSet resultSet1 = sql.getResultSet(querys.get(i).toString());
String table1 = subRep.getDatabaseController().getDatabase().getTables().getTable(0).getName();
//Push the Java Resultset into the report. This will then become the datasource of the report when the report itself is generated.
subRep.getDatabaseController().setDataSource(resultSet1, table1 , "resultTbl"+i);
and it throws me:
Failed to export report
com.crystaldecisions.reports.exportinterface.exceptions.ExportException: No se pudo crear el controlador
when I look at the log, it looks like it could generate the report, but when It tries to export to pdf fails.
The log is as follows:
(dataengine.datasource ? ) End reading from database
(dataengine.datasource ? ) Close rowset
(dataengine.datasource ? ) Finished running the first pass
(reports.dataengine ? ) Creating new data source
(reports.dataengine ? ) Create new report state
(dataengine.datasource ? ) Failed to create controller
(formatter.objectformatter ? ) com.crystaldecisions.reports.dataengine.a1: No se pudo crear el controlador
(disk.b ? ) Disk Exporter: finalizing export to destination
(reportengineinterface.Engine ? ) Failed to export report
com.crystaldecisions.reports.exportinterface.exceptions.ExportException: No se pudo crear el controlador
at com.crystaldecisions.reports.common.be.<init>(Unknown Source)
at com.crystaldecisions.reports.common.be.<init>(Unknown Source)
at com.crystaldecisions.reports.exportinterface.exceptions.ExportException.<init>(Unknown Source)
at com.crystaldecisions.reports.formatter.a.b.a(Unknown Source)
at com.crystaldecisions.reports.reportengineinterface.g.a(Unknown Source)
at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.export(Unknown Source)
at com.crystaldecisions.report.web.event.bn.a(Unknown Source)
at com.crystaldecisions.report.web.event.u.a(Unknown Source)
at com.crystaldecisions.report.web.event.b1.broadcast(Unknown Source)
at com.crystaldecisions.report.web.event.as.a(Unknown Source)
at com.crystaldecisions.report.web.WorkflowController.if(Unknown Source)
at com.crystaldecisions.report.web.WorkflowController.doLifecycle(Unknown Source)
at com.crystaldecisions.report.web.ServerControl.a(Unknown Source)
at com.crystaldecisions.report.web.viewer.ReportExportControl.a(Unknown Source)
at com.crystaldecisions.report.web.ServerControl.processHttpRequest(Unknown Source)
at _reportes._jsps._VisorReportes._jspService(_VisorReportes.java:117)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:60)
at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:662)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:370)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:629)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Caused by: com.crystaldecisions.reports.formatter.formatter.c: No se pudo crear el controlador
at com.crystaldecisions.reports.common.be.<init>(Unknown Source)
at com.crystaldecisions.reports.common.be.<init>(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.c.<init>(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bn.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bn.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.a8.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.a8.goto(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.i.goto(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.a8.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bl.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bn.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bn.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.a9.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.b3.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.b3.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bu.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bl.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.b3.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.b3.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.b3.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.b0.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.a4.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.d.l.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.b3.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.b3.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bu.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.d.l.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bl.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.d.o.h(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.d.o.long(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.d.o.h(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.d.o.aA(Unknown Source)
at com.crystaldecisions.reports.formatter.a.b.a(Unknown Source)
... 31 more
Caused by: com.crystaldecisions.reports.dataengine.a1: No se pudo crear el controlador
at com.crystaldecisions.reports.common.be.<init>(Unknown Source)
at com.crystaldecisions.reports.common.be.<init>(Unknown Source)
at com.crystaldecisions.reports.dataengine.a1.<init>(Unknown Source)
at com.crystaldecisions.reports.dataengine.j.lc(Unknown Source)
at com.crystaldecisions.reports.dataengine.j.<init>(Unknown Source)
at com.crystaldecisions.reports.dataengine.i.do(Unknown Source)
at com.crystaldecisions.reports.dataengine.i.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.a5.if(Unknown Source)
at com.crystaldecisions.reports.dataengine.a5.a(Unknown Source)
... 61 more
Caused by: com.crystaldecisions.reports.saveddata.c: No existe el campo de condici�n para este orden: ascending
at com.crystaldecisions.reports.saveddata.a.g.if(Unknown Source)
at com.crystaldecisions.reports.saveddata.a.a(Unknown Source)
at com.crystaldecisions.reports.saveddata.e.a(Unknown Source)
at com.crystaldecisions.reports.saveddata.e.a(Unknown Source)
... 67 more
(reportengineinterface.JPEReportSource ? ) Exception while processing export request: No se pudo crear el controlador
(reportengineinterface.JPEReportSource ? ) Releasing license
(reportengineinterface.JPEReportSource ? ) The report source timed out and will be disposed
(reportengineinterface.Engine ? ) Engine has been disposed
(reportengineinterface.JPEReportSource ? ) The report source has been disposed
The code I use to export is as follows:
ReportExportControl control = new ReportExportControl();
ExportOptions exportOptions = new ExportOptions();
IPDFExportFormatOptions opts = new PDFExportFormatOptions();
exportOptions.setExportFormatType(ReportExportFormat.PDF);
opts.setStartPageNumber(1);
opts.setEndPageNumber(10000);
exportOptions.setFormatOptions(opts);
Object reportSource = session.getAttribute("reportSource");
control.setExportOptions(exportOptions);
control.setReportSource(reportSource);
control.setEnableParameterPrompt(false);
control.refresh();
System.out.println("isOwnPage: "+control.isOwnPage());
control.processHttpRequest(request, response, application, pageContext.getOut());
Help me please!!!