Use case
Recently i encountered the following use case: A user had a report with a subreport. The main report was based on Domain_1 while the subreport was running against Domain_2. The requirement was to create a Report Book using this report+subreport and get it running on JasperReports Server.
Resolution
There actually is a way to have a book report (or a regular master report) with two parts (subreports/subdatasets) that use different domains. However it required the original report to be modified.
There's a property called com.jaspersoft.jrs.data.source which can be included in a report/dataset to instruct the server to use a specific JasperReports Server data source to populate connection parameters for that report/dataset. It only works when the report runs inside JasperReports Server. The value of the property is the repository path of the data source.
Attached is a JasperReports Server export from one of our engineers with a working example of a Report Book. After import you should find it under /Public/domain folder. Also it assumes that you have a /Domains folder at root level with two sample domains: Simple Domain and Supermart Domain. These domains are part of samples which are installed if you opted to include samples during JasperReports Server installation.
Note that the master report has a dummy SQL query. That's currently required because whenNoDataType="AllSectionsNoDetail" does not work for report books (that's a defect which should be fixed in future versions of the application).
Ref. Case 00058327
Recommended Comments
There are no comments to display.