Jump to content
Changes to the Jaspersoft community edition download ×

Sending a Collection insteand of a Connection

Recommended Posts

By: Francisco - kjava2

Sending a Collection insteand of a Connection

2005-06-22 05:58

Hello all,


I would like to ask if anyone knows how I could send a Collection to the report insteand of seding a Connection or a JRResultSetDataSource.


My problem is that I have a result of 2 ResulSet and I need to create the report of them.


I would like to do something like this:

public class BeanPessoa implements Serializable {

String nome;

int idade;

public BeanPessoa(int idade, String nome){




public void setNome(String p){



public void setIdade(int p){



public String getNome(){

return this.nome;


public int getIdade(){

return this.idade;




ArrayList<BeanPessoa> listaPessoa = new ArrayList<BeanPessoa>();

listaPessoa.add(new BeanPessoa(10,"Pedro"));

listaPessoa.add(new BeanPessoa(15,"Maria"));

listaPessoa.add(new BeanPessoa(22,"Roberto"));

listaPessoa.add(new BeanPessoa(16,"Luiz"));


I needed the report could read the FIELD [idade] and [nome] for each item in the Collection as it was a ResultSet.


Is that possible?

Or is there any other way to send result of 2 ResultSet to a report?


Thanks a lot

Francisco - Brazil



By: Franco Weichel - franco_weichel

RE: Sending a Collection insteand of a Connec

2005-06-28 10:11

Look at the Data Source sample.


It does exactly what you are looking for.





By: AlperULUSOY - taramakalemi

RE: Sending a Collection insteand of a Connection

2005-07-04 03:22



its in Portuguese but ithink it will be helpful..

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