-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: JasperReports and Hibernate
PostPosted: Thu Apr 29, 2004 7:17 am 
Newbie

Joined: Wed Apr 28, 2004 4:32 pm
Posts: 1
Guys,

I'm using Firebird 1.5, Hibernate 2.1 and JasperReports.
I have problems when I need to get a list attribute from a class.
I got the example from http://www.hibernate.org/79.html and I'm using the HibernateQueryResultDataSource class.


Here is the code:

public class Usuario {

private String nome;
private String senha;
private Unidade unidade;
private List listaPerfil = new ArrayList();
.
.
.

This is the hibernate query:
List listaUsuario = ses.find("select u.nome, u.senha, u.unidade.nome, u.listaPerfil from Usuario as u");

I'm mapping the fields like this:
String[] fields = {"nomeUsuario","senhaUsuario","nomeUnidade", ???};
??? = where the listaPerfil field was supposed to be.

The problem is:
I have a master report and a subreport in which the fields from the listaPerfil list should be.
So, the master report will have the u.nome, u.senha and u.unidade.nome fields and the subreport will have the fields from the list.
I don't know HOW i can fill this subreport with the listaPerfil values.

Thanks in advance.
Marcelo.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 29, 2004 9:12 am 
Regular
Regular

Joined: Tue Aug 26, 2003 3:09 pm
Posts: 58
I don't really think there is anything Hibernate specific here. I think this is more of a JasperReports question. Get the report working without Hibernate first.


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 02, 2004 7:34 am 
Newbie

Joined: Sat Apr 24, 2004 6:54 pm
Posts: 2
Hello,

I asked almost the same question about using hibernate and jasperreports http://forum.hibernate.org/viewtopic.php?t=930271. I have my report working without using hibernate. I spent a lott of time working it out with hibernate but without a positive result.
If you find a solution could you please post it here? Or anyone else?
Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.