Jasper Report Problem: How to share subDataSet

1. Background

In our business requirement, there are 2 tables on the report template, however, just one SQL query can feed these 2 tables' data requirement. So, I'm just wondering it's possible to define only one subdataset and avoid repeatedly executing the same SQL query.

2. How about rewindable data source?

Unfortunately, JRResultSetDataSource doesn't implement JRRewindableDataSource interface, so I guess there is no official support for my requirement. Additionally, I didn't find any third party solution. Invent one by myself? forget it, too busy.


Reference:

1. http://stackoverflow.com/questions/7577409/how-to-use-the-same-datasource-twice-in-jasperreports-ireport

2. http://jasperreports.sourceforge.net/sample.reference/datasource/

你可能感兴趣的:(Jasper Report Problem: How to share subDataSet)