different data source for multiple sub reports

0

I have a Master Report and 4 sub reports say A,B,C and D.

Data in sub report A does not repeat.

Data in sub report B repeats dynamically.

Data in sub report C is a Table layout repeats dynamically

I am using TablelModelDatasource to populate the data from jswing application.

Question:How do i pass different TableModeldatasource say DS1,DS2,DS3,DS4 to sub report A,B,C, D individually.

At the moment , i tried the below options.

1. Passing master report datasource to sub reports. Problem : Sub Report B did not have any data to print.

2.Passed the same datasource using the below method to sub report A and B


  JasperFillManager.fillReportToFile("masterreport.jasper", parameters, new JRTableModelDataSource(new

CustomTableModel()));
JasperFillManager.fillReportToFile("subreportB.jasper", parameters, new JRTableModelDataSource(new

CustomTableModel()));

Unable to resolve this. please suggest.

 

 

 

 

 

evanspaiva's picture
Joined: Dec 3 2012 - 2:26am
Last seen: 6 years 9 months ago

0 Answers:

No answers yet
Feedback
randomness