ravenheart Posted September 11, 2014 Share Posted September 11, 2014 I've tried looking for existing answers on this, but any semi-relevant articles I can find either don't make sense to me, or don't work. So...I have what I thought was a pretty simply scenario in that I have two different databases, each of which has their own data adaptor set up and working in both Jasper Studio and Jasper Server. One is a Redshift database, the other is a MySQL database.There's information in both that we'd like to compare in a report, and I need a way to do that.I don't really mind if that solution is a bunch of separate Datasets, each using a different connection, or subreports, or whatever. But I need to end up with:Master Report using any data adaptor, doesn't matterTable 1 using Data Adaptor 1Table 2 using Data Adaptor 2Obviously I can easily create several datasets within the same report, eash using their own data adaptor, but then when I want to plug those datasets into a report element, say a table, that element needs to be told which connection to use, and "the one the dataset uses" isn't an option. Similarly I can create subreports which exlusively use one data adapator, but again there doesn't seem to be a way for the Master Report to instruct the subreport elements to use their own data adaptors.Thoughts? Thanks. Link to comment Share on other sites More sharing options...
calculate.machine Posted February 5, 2015 Share Posted February 5, 2015 Typically there are three Jasper scenarios in which multiple data sources are required: different data sources for different tables, for different subreports and for master report and table. All of them can be handled through esProc along with Jasper. If master report data come from MySQL, you can retrieve the data using this line of esProc code: result mysql1.query("select * from emp") result msSQL1.query("select * from sales)。If table data come from MSSQL, you can use this line of code to get them: result msSQL1.query("select * from sales) See https://dataccelerator.wordpress.com/2015/02/04/esproc-assists-report-development-different-datasources-for-master-report-and-subreport/ for details. 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