2004 IR Help Posted August 22, 2006 Share Posted August 22, 2006 By: lsbouffard - lsbouffard Alias in SQL not supported 2005-06-09 19:02 Hi, I just upgraded from JasperReports 0.6.1 to 0.6.7 and I wasn't able to fill the reports where alias were used in the SQL statement. Ex. SELECT A.description AS 'entityName' FROM table A. The error I got was : Invalid column name : entityName. ... I fixed the problem by changing "metadata.getColumnName(i)" by "metadata.getColumnLabel(i)" in the function getColumnIndex(String fieldName) in the class net.sf.jasperreports.engine.JRResultSetDataSource. Is this solution acceptable? Is it possible to incorporate it in a future release? Thanks By: lsbouffard - lsbouffard RE: Alias in SQL not supported 2005-06-14 14:55 Is there other users who had problems with alias in SQL query? 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