# Jaspersoft Ireport Export Integration This article explains how to use Treasure Data with [JasperSoft iReport](http://jasperforge.org/projects/ireport), by leveraging [our JDBC driver](https://docs.treasuredata.com/articles/project-product-documentation/jdbc-driver-for-hive-query-engine). By combining Treasure Data with JasperSoft, you can process terabytes of data on the cloud, while continuing to use your existing JasperSoft instances. # Prerequisites - Basic knowledge of Treasure Data. - [The Schema article](https://docs.treasuredata.com/articles/project-product-documentation/schema+Management) explains how to manipulate the TD schema. **Don't have time** to set up JasperSoft + Treasure Data? Leverage our [Setup Consultation Service](https://docs.treasuredata.com/smart/project-product-documentation/consultation). # Download JasperSoft iReport You can download JasperSoft iReport from the link below. Version 4.6.0 was used for this article. - [JasperSoft Community’s iReport Designer](http://community.jaspersoft.com/project/ireport-designer) # Download the Treasure Data JDBC Driver You can download the driver itself from the link below. The driver is still in beta; any feedback is appreciated. - [JDBC Driver Download](https://mvnrepository.com/artifact/com.treasuredata/td-jdbc) | | | --- | | This driver only works with Treasure Data. It does not run on other environments, such as your local Hadoop/Hive cluster. | # Add Treasure Data as Data Source To add Treasure Data as Jasper’s data source, follow the procedure below. ## Add the JDBC Driver Jar to Classpath Go to Preferences -> iReport Tab -> Classpath, and press the Add Jar button. Select the downloaded JDBC driver and check the Reloadable box in the table. ![](/assets/image-20191016-195209.3f52124f98ca0accaea9fa792a9f47508da2a977d80c5388ca5b974da368bfbe.a987c990.png) ## Create a New Data Source Press the database icon, which is located near the ‘Empty datasource’ indicator. Add a new data source with type: Database JDBC connection. ![](/assets/image-20191016-195157.448e5563640a6fba08b4f0d003ac6f98295ecc7d6600c51c8e3b754e5073d436.a987c990.png) ## Configure your JDBC Connection Configure your JDBC parameters as shown in the following figure. Make sure to provide your credentials (your email + password). Treasure Data's JDBC driver will NOT appear in the "JDBC Driver" dropdown. Select the dropdown area and type `com.treasure\_data.jdbc.TreasureDataDriver`. ![](/assets/image-20191016-195144.72e4dad52abb5dbc9c22317938c069d1c7db901483643edb76390352d27ad46e.a987c990.png) ### Create Reports The procedure for this step is identical to creating reports with a JDBC source. First, create a report by navigating to File -> New -> Report. **Make sure that your data source is set to “TreasureData”** (or your name for our JDBC connection). ![](/assets/image-20191016-195126.3e7382ed13dd12c13c83f58f364752d61ebab882ed16c03e3eaa132daeebe8fe.a987c990.png) Here, the query is ``` SELECT code, COUNT(1) AS count FROM apache_log GROUP BY code ``` Some notes about this sample data: 1. The data in this table is taken from a typical Apache log. The field code corresponds to the HTTP status code. Essentially, we are counting the number of HTTP requests per status code. 2. Treasure Data does not have a pre-defined schema out of the box. We, therefore, need to add schema for the field named code for the above query to work. ```bash $ td table:show demo apache_log ``` The rest of the setup is exactly the same as any other report. ![](/assets/image-20191016-195112.0ba730a029994724774f7dc566bb0c729d726268009ca2cc267bbdf330d50277.a987c990.png)