Jump to content

Access a second java.util.List in a group?


grinvon

Recommended Posts

Hi there!

I am facing a new problem about iReport. I have a list with an entity model added. This entity have a list of another entity. The problem consists in how try to show the values from the second list.

Ex:

public class Company {

 private String name;

 private List<Person> people;

//getters and setters below...
}



public class Person {

 private String name;

//getters and setters below...
}



I need to show the person list values. I am using "JRBeanCollectionDataSource".

I had created a group and associated that list: "${files} is java.util.List". I noticed that I have one variable created in variables group as "grp_files_COUNT". I tried to use it to interact with that list, but a lot of erros pop up in the output console.

$F{files}.get($V{grp_files_COUNT}.intValue()).getName()



I really have no idea how to do it, some clues? Sorry about my poor english!

Regards!

Link to comment
Share on other sites

  • 4 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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