babarincairo Posted October 3, 2006 Share Posted October 3, 2006 Hi, I want to build a crosstable with a subdataset but I've a problem with the sql query : Code:SELECT VED_complet,YEAR(VED_crea_date) as VED_anneeFROM VED_vedette The problem comes from YEAR(VED_crea_date) as VED_annee When I execute the report, I have the following error : Code:[code]org.springframework.webflow.ActionExecutionException: Exception thrown executing [AnnotatedAction@141e072 targetAction = com.jaspersoft.jasperserver.war.action.ViewReportAction@1f680ea, attributes = map[[empty]]] in state 'verifyData' of flow 'viewReportFlow'; nested exception is com.jaspersoft.jasperserver.api.JSExceptionWrapper: net.sf.jasperreports.engine.JRException: Unknown column name : VED_annee I think that Jasper doesn't support the keyword "AS" but I don't know to do without Can anyone help me ? Thanks Link to comment Share on other sites More sharing options...
lucianc Posted October 3, 2006 Share Posted October 3, 2006 What database and JDBC driver (incl version) are you using? Regards,Lucian Link to comment Share on other sites More sharing options...
babarincairo Posted October 3, 2006 Author Share Posted October 3, 2006 I use : - MySQL 5.0.21- JDBC 5.0.3 Link to comment Share on other sites More sharing options...
lucianc Posted October 3, 2006 Share Posted October 3, 2006 There are a couple of bugs (artf1368 and artf1545) related to this. There is not fix yet. MySQL JDBC connector 5.0 breaks backward compatibility by changing the semantics of the ResultSetMetaData.getColumnName() method. According to this bug report, the 5.0.4 connector will feature a compatibility flag (useOldAliasMetadataBehavior) so that applications which used to work with the 3.1 connector work with the 5.0 connector as well. Regards,Lucian 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