Experts, I am trying to work on report which contains main report and sub reports. In main report's header i want to pass sub report to print the header and in sub report i want to display data. I am using JRBeanCollectionDataSource. I have created a bean class where in I am setting/getting methods. In my main class I am exporting the beans to jasper file. My problem resides in passing collections of multiple beans. How should I pass multiple beans to jasper files?
Now my problem is how to pass Object of here? Instead of passing list through JRBeanCollectionDataSource jbs = new JRBeanCollectionDataSource(list); i would like to pass Object of list so that i can send multiple beans. I can pass collection through public JRBeanCollectionDataSource(java.util.Collection beanCollection) but not the objects. Does anyone know how should i pass objects? I am stuck in this problem as i am confused here while passing datasource. I can pass only one datasource to jasper report. Please do let me know your ideas and suggestions. Thank you.