Jump to content
JasperReports Library 7.0 is now available ×

I have a Java Data Source with inner List


jimmi_mscit

Recommended Posts

I have a Problem to print this kind of data in JasperReport,

 

class Emp{

 

String name;

String surname;

 

ArrayList <Contact> contactList;

 

//setter and getter methods of List

 

 

}

 

class Contact

{

String address1;

String address2;

//setter and getter methods of List

}

 

so How can i develop this kind of Report

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

You can encapsulate the objects within a JRBeanArrayDataSource or JRBeanCollectionDataSource and access the elements of the objects as fields. The inner contactList is best suited for being used in a sub-report (just off top of my head, this may not be the case depending on your report design), you would pass the sub-report a datasource expression of "new JRBeanCollectionDataSource($F{contactList})"

 

HTH,

Robin

Link to comment
Share on other sites

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