Hi.
I try to export a report from my java application. The report contains a main report and a subreport, with a link where the value of the parameter can change.
If I fire a report with a distinct value of the parameter link field, report is opening fine.
If I fire a report where the parameter link field have different values, I get the following error message.
ERROR [JRCCommunicationAdapter:?] detected an exception: Unexpected database connector error
at com.crystaldecisions.reports.datafoundation.DFQuery.for(Unknown Source)
at com.crystaldecisions.reports.datalayer.a.do(Unknown Source)
at com.crystaldecisions.reports.datalayer.a.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.m.b(Unknown Source)
at com.crystaldecisions.reports.dataengine.j.b(Unknown Source)
at com.crystaldecisions.reports.dataengine.m.o(Unknown Source)
at com.crystaldecisions.reports.dataengine.m.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.ContextNode.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.ContextNode.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.j.case(Unknown Source)
at com.crystaldecisions.reports.dataengine.h.<init>(Unknown Source)
at com.crystaldecisions.reports.dataengine.DataContext.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.DataProcessor2.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.DataProcessor2.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.DataProcessor2.new(Unknown Source)
at com.crystaldecisions.reports.dataengine.DataProcessor2.try(Unknown Source)
at com.crystaldecisions.reports.dataengine.DataProcessor2.int(Unknown Source)
at com.crystaldecisions.reports.dataengine.DataProcessor2.I(Unknown Source)
at com.crystaldecisions.reports.dataengine.DataProcessor2.if(Unknown Source)
at com.crystaldecisions.reports.dataengine.DataProcessor2.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.u.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.u.e(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.u.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.aa.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.v.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.v.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ColumnFormatter.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.aa.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ah.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ReportColumnFormatter.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.paginator.SinglePageFormatter.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ColumnFormatter.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.paginator.SinglePageFormatter.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.aa.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.do(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.formatPage(Unknown Source)
at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.byte(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(Unknown Source)
at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
at com.businessobjects.sdk.erom.jrc.a.a(Unknown Source)
at com.businessobjects.sdk.erom.jrc.a.execute(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ds.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.getPage(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.getPage(Unknown Source)
at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.getPage(Unknown Source)
at com.businessobjects.crystalreports.viewer.core.rs.RSRecordSource.openInputStream(Unknown Source)
at com.businessobjects.crystalreports.viewer.core.TSLVReader.a(Unknown Source)
at com.businessobjects.crystalreports.viewer.core.TSLVReader.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)
Does anyone know how to solve this?
This is my code:
......
conn = getConnection();
st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY );
runtimeResultSet = st.executeQuery(sql);
sqlList.add(new SqlStatementResultSetKeeper(st, runtimeResultSet));
ReportClientDocument reportClientDoc = new ReportClientDocument();
String report = reportOrder.getReportName();
reportClientDoc.open(report, 0);
DatabaseController dbCtrl = reportClientDoc.getDatabaseController();
ITable table = dbCtrl.getDatabase().getTables().getTable(0);
dbCtrl.setDataSource(runtimeResultSet, table.getAlias(), "RuntimeResultSet");
/* subreport*/
SubReport[] subReports = reportOrder.getSubReports();
int resultSetCounter = 2;
for(int i = 0; i < subReports.length; i++){
String reportName = subReports[i].getReportName();
String reportSql = subReports[i].getReportSql();
st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
runtimeResultSet = st.executeQuery(reportSql);
sqlList.add(new SqlStatementResultSetKeeper(st, runtimeResultSet));
SubreportController subreportCtrl = reportClientDoc.getSubreportController();
ISubreportClientDocument subreportClientDoc = subreportCtrl.getSubreport(reportName);
DatabaseController subdbCtrl = subreportClientDoc.getDatabaseController();
ITable subreportTable = subdbCtrl.getDatabase().getTables().getTable(0);
subdbCtrl.setDataSource(runtimeResultSet, subreportTable.getAlias(), "RuntimeResultSet" + resultSetCounter++);
}
IReportSource reportSource = reportClientDoc.getReportSource();
exportControl.setReportSource(reportSource);
exportControl.setExportOptions(reportOrder.getExportOptions());
if(reportOrder.getExportControlName() != null && !reportOrder.getExportControlName().equals("")){
exportControl.setName(reportOrder.getExportControlName());
}
reportClientDoc.close();
exportControl.processHttpRequest(request, response,session.getServletContext(), null);