Jump to content
Changes to the Jaspersoft community edition download ×

JasperReports and Hibernate


2005 IR Help

Recommended Posts

By: Marcelo - marcelocda

JasperReports and Hibernate

2004-04-28 13:43

Guys,

 

I'm using Hibernate 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.

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