We are using the crystal java runtime in order to print reports. We connect to an oracle DB. As we want to support different installations, we need to change the schema name (and other connection details) using databaseController.replaceConnection() and databaseController.setTableLocation(). This works perfectly fine for most reports.
Unfortunately, when the report contains sql expression fields, when calling databaseController.replaceConnection() we get the following error. Is there any way to work around this?
(Note: The german error message "Fehler beim Parsen des Ausdrucks." means "Error when parsing expression").
Caused by: com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Fehler beim Parsen des Ausdrucks.---- Error code:-2147467259 Error code name:failed
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:2284)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:732)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:166)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:528)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:526)
at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:524)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:423)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:351)
at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)
at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)
at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)
at com.crystaldecisions.sdk.occa.report.application.ds.a(SourceFile:186)
at com.crystaldecisions.sdk.occa.report.application.FormulaFieldController.a(SourceFile:329)
at com.crystaldecisions.sdk.occa.report.application.FormulaFieldController.check(SourceFile:288)
at com.crystaldecisions.sdk.occa.report.application.FormulaFieldController.if(SourceFile:1030)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:3929)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.replaceConnection(SourceFile:3880)
at com.werum.pasx.infrastructure.printing.printtechnology.crystal.AbstractCrystalReportsPrintTechnology.setConnection(AbstractCrystalReportsPrintTechnology.java:282)
at com.werum.pasx.infrastructure.printing.printtechnology.crystal.AbstractCrystalReportsPrintTechnology.setDatabaseToReport(AbstractCrystalReportsPrintTechnology.java:181)
... 27 more
Caused by: com.crystaldecisions.reports.reportdefinition.ReportDefinitionException: Fehler beim Parsen des Ausdrucks.
at com.crystaldecisions.reports.reportdefinition.SQLExpressionFieldDefinition.td(SourceFile:317)
at com.crystaldecisions.reports.reportdefinition.o.ad(SourceFile:5314)
at com.businessobjects.reports.sdk.requesthandler.FormulaRequestHandler.a(SourceFile:159)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1544)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:660)
... 47 more
Caused by: com.crystaldecisions.reports.common.QueryEngineException: Fehler beim Parsen des Ausdrucks.
at com.crystaldecisions.reports.queryengine.Connection.if(SourceFile:1203)
at com.crystaldecisions.reports.queryengine.ExpressionField.tk(SourceFile:161)
at com.crystaldecisions.reports.reportdefinition.SQLExpressionFieldDefinition.td(SourceFile:294)
... 51 more
Caused by: com.businessobjects.reports.jdbinterface.common.DBException: Fehler beim Parsen des Ausdrucks.
at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCQueryDefinition.ParseExpression(Unknown Source)
at com.crystaldecisions.reports.queryengine.Connection.if(SourceFile:1199)
... 53 more
Hi Norbert
I am not sure what version of CR you are using - but you always want to be using the latest one. See: where applying the later patch resolved that error.
So getting to the latest SP for your version will be the 1st thing to do.
And for now, one more thing to keep in mind:
1217871 - What is the intended use of 'SQL Expression Fields' in Crystal Reports?
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Add a comment