In my main report I am having table in detail band with its own separate dataset. Now I am using Javabeans as datasource for both the main report's dataset and for table's dataset as well. The situation is like
There are two different ArrayList of beans. One is for Main report and the other is for table.
I am passing table's ArrayList as a parameter to the main report using map.put() . And in the Edit Table Datasource I am writing this expression.
new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{List})
where $P{List}is a parameter of main report. You can understand it by $P.
Is that a right approach?