I am seeing a strange exception when I try to change the datasource in a report. Here are the particulars which may be important.
Crystal report has a stored procedure that is the data source.
using the changeDataSource method in the JRCSampleHelper to change the DBUser, Password, and DB connection info.
Report has NO subreports.
When it gets to the following line:
clientDoc.getDatabaseController().setTableLocation(table, tables.getTable(i));
an exception is thrown. (this is thrown whether I do it like shown (modify the table returned from tables.getTable(x) or whether I do a clone of that and then change everything)
The exception - which i believe is not really the exception (I think the report is running and simply cannot connect to the right db) is as follows:
2008-12-22 11:00:46,430 ERROR [ReportDefinition] Default printer was not valid, switching to 'GetUnPrinter'.
2008-12-22 11:00:46,680 FATAL [JRCCommunicationAdapter] Request failed and JRC Command failed to be undone
2008-12-22 11:00:46,680 ERROR [JRCCommunicationAdapter] JRCAgent5 detected an exception: No results were returned by the query.
at com.crystaldecisions.reports.queryengine.driverImpl.o.eC(Unknown Source)
at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
at com.crystaldecisions.reports.queryengine.ax.if(Unknown Source)
at com.crystaldecisions.reports.queryengine.bc.byte(Unknown Source)
at com.crystaldecisions.reports.queryengine.bc.new(Unknown Source)
at com.crystaldecisions.reports.queryengine.bc.for(Unknown Source)
at com.crystaldecisions.reports.reportdefinition.datainterface.g.a(Unknown Source)
at com.crystaldecisions.reports.reportdefinition.datainterface.g.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.bj.new(Unknown Source)
at com.crystaldecisions.reports.common.as.a(Unknown Source)
at com.crystaldecisions.reports.common.ae.a(Unknown Source)
at com.businessobjects.reports.sdk.b.k.a(Unknown Source)
at com.businessobjects.reports.sdk.b.w.m(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ag.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.av.if(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.an.new(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.cb.for(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.u.performDo(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.u.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.setTableLocation(Unknown Source)
at com.crystaldecisions.reports.sdk.DatabaseController.setTableLocation(Unknown Source)
at com.sacs.casi.oasis.utils.reporting.JRCHelper.changeDataSource(JRCHelper.java:161)
at com.sacs.casi.oasis.utils.reporting.JRCHelper.changeDataSource(JRCHelper.java:76)
at com.sacs.casi.oasis.action.reporting.ReportingAction.getReportClientDoc(ReportingAction.java:368)
at com.sacs.casi.oasis.action.reporting.ReportingAction.view(ReportingAction.java:156)
at com.sacs.casi.oasis.action.reporting.ReportingAction.unspecified(ReportingAction.java:48)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:245)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:170)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1078)
at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:295)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:396)
at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:347)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:232)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
I think the line: "Request failed and JRC Command failed to be undone" is where the real problem is, but I am at a loss as to how to fix it.
Any help is greatly appreciated.
Al