Sorry I forgot to mention that the info I gave is based on using iReport/jasperReports, not sure what you are using now but I definately recommend iReport.
If I understand your requirements correctly I think grouping would be better than having multiple subreports.
Grouping the data on users allows you to create a seperate table for each user, you can also have a header and footer for each user and you can also perform calculations and have totals at the bottom of each group.
Hope this helps.
Peter Jin wrote:
I may need to put several sub reports in the detail section in the master report. So the sub reports will get loaded many times. Will this cause significant performance issues? Does jasper cache data source for report in this case?
User's data are scattered in 5 tables and I need to put those data together under a particular user. I don't want to use UNION because HQL doesn't support it. In addition, Union 5 tables may result in a huge SQL. I have to use one sub report for each table and iterate users in master report and for each user iterate all sub reports to display data relevant to that user.