kwfoo Posted June 28, 2010 Share Posted June 28, 2010 Hi,I am a very new user trying on the iReport latest version 3.7.3, having some problem on a Oracle database.I am able to connect iReport to Oracle datasourcethrough Oracle JDBC driver 1.4. When trying to generate a simple report it give me error during compilation.Compilation exceptions: com.jaspersoft.ireport.designer.compiler.ErrorsCollector@155e7 net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, calculator_baan_com_sup_list_1277709491715_688172: 45: unexpected token: field_TTCCOM020802_T @ line 45, column 25. 1 error at net.sf.jasperreports.compilers.JRGroovyCompiler.compileUnits(JRGroovyCompiler.java:101) at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:188) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:215) at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:131) at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:514) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, calculator_baan_com_sup_list_1277709491715_688172: 45: unexpected token: field_TTCCOM020802_T @ line 45, column 25. 1 error After some trial on error, I notice the problem was actually cause by the code generate by the Query Designer in the case that the fields in our database include a special character "$" in it. The SQL statement generated as follow:SELECT TTCCOM020802."T$SUNO" AS TTCCOM020802_T$SUNO, TTCCOM020802."T$NAMA" AS TTCCOM020802_T$NAMA, TTCCOM020802."T$CCTY" AS TTCCOM020802_T$CCTY,FROM "BAAN"."TTCCOM020802" TTCCOM020802 It will has no problem if I change the code to remove the $ after the AS statementSELECT TTCCOM020802."T$SUNO" AS TTCCOM020802_TSUNO, TTCCOM020802."T$NAMA" AS TTCCOM020802_TNAMA, TTCCOM020802."T$CCTY" AS TTCCOM020802_TCCTY,FROM "BAAN"."TTCCOM020802" TTCCOM020802 Is there any option that I can configure to avoid the code generated with the above problem? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now