File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Open Source Projects and the fly likes Jasper Report : Connecting multiple sources Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Jasper Report : Connecting multiple sources" Watch "Jasper Report : Connecting multiple sources" New topic

Jasper Report : Connecting multiple sources

Yati Tan
Ranch Hand

Joined: May 28, 2005
Posts: 56

Can we connect multiple sources at one time from jasper Report ? Do we have to drag drop columns or write querries using DBlinks ? Please let me know.


SCJP 1.4<br />SCJA 1.0<br />SCWCD 1.4
bilal sidiqui

Joined: Aug 09, 2010
Posts: 17
Hello Yati,

If multiple sources mean multiple tables of the same database, then you can do this just by writing the correct SQL query.

If you want to connect multiple databases, you need to use a subreport component for each new database. Please see the following recipe from my book, which demonstrates how to use different subreports (each connected to its own database) in a master report.

Using Multiple Relational Databases to Generate a Report.

Please also note that my JasperReports book demonstrates the use of variety of datasources including relational databases, XML files, and JavaBeans.

Bilal Siddiqui, Author of JasperReports 3.6.0 Development Cookbook
I agree. Here's the link:
subject: Jasper Report : Connecting multiple sources
jQuery in Action, 3rd edition