Jump to content
Changes to the Jaspersoft community edition download ×

Can not write field descripton when use hql

Recommended Posts

By: Welkin Hu - welkinhu

Can not write field descripton when use hql

2006-03-30 21:39

I meet a problem. It should be a JasperReport bug.

My report use hibernate connection. it can work if I do not add descripton to field.

But if I add the description, the report can not work!

My HQL is

select s.scheduleName as scheduleName, s.description as description from ScheduleMaster s

where s.companyId = 1004


One of my fields' XML

<field name="scheduleName" class="java.lang.String">




Exception message:


Error filling print...

Hibernate session opened Hibernate session closed net.sf.jasperreports.engine.JRRuntimeException: Unknown HQL return alias "fg". at net.sf.jasperreports.engine.data.JRHibernateAbstractDataSource.getFieldReader(JRHibernateAbstractDataSource.java:189) at net.sf.jasperreports.engine.data.JRHibernateAbstractDataSource.assignReaders(JRHibernateAbstractDataSource.java:132) at net.sf.jasperreports.engine.data.JRHibernateAbstractDataSource.<init>(JRHibernateAbstractDataSource.java:69) at net.sf.jasperreports.engine.data.JRHibernateListDataSource.<init>(JRHibernateListDataSource.java:55) at net.sf.jasperreports.engine.query.JRHibernateQueryExecuter.createResultDatasource(JRHibernateQueryExecuter.java:160) at net.sf.jasperreports.engine.query.JRHibernateQueryExecuter.createDatasource(JRHibernateQueryExecuter.java:129) at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:632) at net.sf.jasperreports.engine.fill.JRFillDataset.setDatasource(JRFillDataset.java:576) at net.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java:565) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:847) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:672) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:123) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:420) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:256) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:701) at java.lang.Thread.run(Thread.java:534)

Print not filled. Try to use an EmptyDataSource...!





By: Welkin Hu - welkinhu

Who can answer me?

2006-04-01 20:15






By: Lucian Chirita - lucianc

RE: Can not write field descripton when use h

2006-04-03 00:36

The Hibernate data source implicitly uses field descriptions (if present) to map values from the result. If you want to suppress this behaviour, set the "net.sf.jasperreports.hql.field.mapping.descriptions" to false either globally (e.g. in jasperreports.properties) or locally in the report (using a <property/> element).




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...