ffranco_1 Posted May 3, 2023 Share Posted May 3, 2023 Hello,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 reportany 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. Thanks,Frederic Link to comment Share on other sites More sharing options...
anish.rai Posted May 8, 2023 Share Posted May 8, 2023 Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times. Link to comment Share on other sites More sharing options...
anish.rai Posted May 22, 2023 Share Posted May 22, 2023 Thank you for your patience, we need a little more time with our team of experts to come up with a solution. We will respond back as soon as we have an answer to your question. Link to comment Share on other sites More sharing options...
Solution Scott Andersen Posted May 30, 2023 Solution Share Posted May 30, 2023 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.adapterFor 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.=============== Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now