fohnbit Posted March 24, 2014 Share Posted March 24, 2014 Hello! I reads some articel, but cant find a solution:I have a report for a MS SQL database. Preview: it worksI have another report for a MYSQL Database. Preview it works. Now I want to add the mySQL report als Subreport of the MS SQL Report.Parameter in both reports is "ID"The subreport should be filtered by the "ID" from the Main report.My problem is to use once MS SQL and once mySQL. Who can help?Using iReport Designer 5.5.0 Thank you! Link to comment Share on other sites More sharing options...
hozawa Posted March 24, 2014 Share Posted March 24, 2014 I don't see the question. Just do it. Don't see where the you're having problem with. Link to comment Share on other sites More sharing options...
fohnbit Posted March 25, 2014 Author Share Posted March 25, 2014 The question is, how I set up the Main rport, to use a subreport with a different database. I habe in Top of the iReport a dropdown of my databases. I can only choose one. When I use the wizard for the subreport, I can choose a different database, but there is no dropdown of my own databases. So how I have to configure the subreport? Master is MS SQL and Subreport is mySQL. Thank you! Link to comment Share on other sites More sharing options...
ybablyuk Posted March 25, 2014 Share Posted March 25, 2014 Hello, Jasperreport server support Virtual Data Source. It's datasource that can have information drom different databases.For Create report you need create Virtual Data Source, create domain from this datasource.After It you will able create domain base report.Other way, you can create subreport - that can use other datasource as main report. In this case data between databases will not joinedLet me know if you need help with it. Link to comment Share on other sites More sharing options...
Solution joehodges2012 Posted March 25, 2014 Solution Share Posted March 25, 2014 I have been looking into doing something similar and found this wiki helpful. http://community.jaspersoft.com/wiki/how-use-two-different-connections-databases-ireport Link to comment Share on other sites More sharing options...
fohnbit Posted March 26, 2014 Author Share Posted March 26, 2014 Hello! I get now the correct result. With: com.jaspersoft.ireport.designer.utils.Misc.getConnection("NAME_OF_SUBDATASOURCE") it works! Thanks! 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