I have created several reports, all with a custom JRDataSource. All seems to be working fine in my Java application.
I use JasperFillManager.fillReport(fileName, params, dataSource) followed by JasperExportManager.exportReportToPdf(jasperPrint) and I am getting the PDF with all the data.
Now want to create more complicated reports that contain data from multiple Datasource. I cannot see how to add additional Datasource in Java to a report. I have read up about sub-datasets and subReports but cannot see how I can associate (in Java) different JRDataSources with different sub-datasets and/or subReports.