jimmi_mscit Posted November 15, 2006 Share Posted November 15, 2006 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 More sharing options...
rsilverns.sympatico.ca Posted November 15, 2006 Share Posted November 15, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now