Jump to content
We've recently updated our Privacy Statement, available here ×

Alias in SQL not supported


2004 IR Help

Recommended Posts

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

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...