We are using Jasper API's
We have extended jrDataSource class of Jasper and designed our own custom data source, overridden all methods present in jrDataSource.
for the report we are using like below
JasperFillManager.fillReport(getJasperReport(report), reportParameters, jrDataSource);
Here jrDataSource is null, Datasource custom class will be mentioned inside jrxml only.
but in case Parent and Child (Main and sub report case)
We are using jrdatasource in case of main report We are not mentioning any datasetexpression in jrxml, whenever main report will be executed jrDatsource will be passed.
JasperFillManager.fillReport(getJasperReport(report), reportParameters, jrDataSource); here jrDataSource will not be empty for main report, but for subreport datasetexpression will be mentioned inside subreport whihc is our custom data source.
When we execute this embedded use case, Jasper API internally getting looped number of times
No of rows for main report * number of rows into subreport
Is this expected behavior? Can we use custom Datasource & Jasper given jrDataSource in one report?