Jump to content
Changes to the Jaspersoft community edition download ×

Can Jaspersoft generate a report by loading data from a CSV file and a database?


ssaadat
Go to solution Solved by Scott Andersen,

Recommended Posts

Dear all,

Can Jaspersoft generate a report by loading data from a CSV file and a database?

For example, assume we have a report that has these fields: Student ID, Student Name, School Name, and Number of Classes for the student. Now the Student ID, Student Name, and School Name are in the database. The CSV file contains Student ID and Number of Classes for the student.

This report should ask user to upload the CSV file, then the Jaspersoft system should use the uploaded file to generate the report. Jaspersoft does not need to save a copy of the CSV file anywhere.

Thank you

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution

Jaspersoft Studio can produce reports that utilize data from both a database and a CSV file. This data must be in separate queries and consumed in separate sub-reports / charts / tables, because CSV data is not queryable and as such cannot be joined together with data from a RDBMS data source. You could drive the report from the CSV file and do separate queries to get the additional data from the RDBMS, but this would not perform well for large volumes of data since a separate DB call would execute for each row of data from the CSV file.

Jaspersoft is also not designed to load CSV files upon execution of a report. You can accomplish what you are doing by using Jaspersoft’s REST API services. These services can be called from your application directly or via Jaspersoft’s ETL tool.  The ETL tool can also be used to load the CSV data into an RDBMS so that the information can be joined together.

Here’s a link to the REST API doco:

http://community.jaspersoft.com/documentation/tibco-jasperreports-server-rest-api-reference/v630/rest-api-overview

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...