I m using ireport for geneating my report which is having a subreport inside main report.
I m passing dataSource of type "JRBeanArrayDataSource" to main report and now i wanted to pass same datasource to subreport.
The way i tried to pass to subreport is
dataSource = new JRBeanArrayDataSource(mainreportData);
and "reportRows" passed as parameter to subreport. But it didn't wrked.