I'm using Jasper server 8.0.2 version and I need to create a report using 2 queries from 2 different oracle databases.
What is the best option 2 define the 2 datasource. I have tried defining the databases as file as below
but i'm getting the error below when running the report
any recommendation or help on the setup to do will be much appreciated.
Sorry if this question was already asked and asnwered but i was not able to find it.
Your approach is fairly sound, although you might try checking the report in as an organization based user, which will change the path (removing the organization specific portion of the path.) With the org infor present it may make it so that the report doesn't work for a non-root user.
From a general strategy pint of view, here is some details on how to use multiple data sources in a report:
A report in JRS is actually a Report Unit, and a ReportUnit is not designed to use multiple data sources (JasperReports data sources). So if your data does not come from the same database (with which you may still pass the REPORT_CONNECTION to your subdataset) or is using the same JSON (for which you could derive a sub dataset), your best option is using data adapters. Any DatasetRun in JasperReports can run against a data adapter specified as a property.
You can create a ReportUnit referencing a (JRS) datasource, i.e. FoodMart. This is not mandatory.
Then, we assume that the chart gets its data from some JSON and the subreport uses an SQL query from a different database.
A Data Adapter in JRS is an xml resource that is uploaded either manually, or by using JSS.
The “binding” between a DatasetRun (which is the part of the report that defines how a subdataset gets its data), and the data adapter is configured in Jaspersoft Studio.
For a subreport, the main dataset will set the property net.sf.jasperreports.data.adapter
For Charts, Tables etc, it is always about using this property (Studio provides also the UI to specify the data adapter)
Be sure you point to a proper data adapter, which is a resource, inside your repository, just like you would do when you reference an image.
Studio will help you also loading these data adapters when the report is published to JRS.