Jacek
Jacek

Reputation: 194

(JasperReports) Combine data from different datasources as columns of the same report row

I am evaluating JasperReports (CE) as a reporting solution for one of my clients.

As for now I like it very much and it looks like a pretty solid platform. One thing I cannot find info about, is the possibility of combining results of sub-queries made to different datasources in one report (not as drill-down sub-reports but as different columns of the same row).

As in example: there is some products info in one database (Firebird), but the sales info, actual stock and purchase prices are stored in a different system, which uses different database (SQL Server of Microsoft). In both databases products are represented with the same product unique code. So I need to query the first database to obtain the "master recordset" for fulfilling some report columns, and then query each product for additional info, which is stored in the second database, combining resulting data from both datasources in the same row as different columns of the same report.

Is it possible with JasperReports? If not, I'd appreciate your suggestions on other reporting solutions being able to fulfill my request.

Upvotes: 3

Views: 1200

Answers (1)

Shwetha Shenoy
Shwetha Shenoy

Reputation: 59

Since your row data is from different DBs, you need to query the required tables in both Dbs, build a BeanDatasource from the resultsets and pass it on to jasper reports.

Upvotes: 1

Related Questions