. Use BIRT to generate reports from CSV


If you achieve data from CSV or other types of flat files in BIRT, you can s use Flat File Data Source. If you generate a dynamic parameter report, you can create a second dataSet to use the parameter and filter the original dataSet. If you use the Unformatted CSV file as a data source and produce the report, you need to implement Scripted Data Source to bring the data in. How can we query data and create a dynamic parameter report as SQL does with flat files? How can we use a simple and easy way replacing Scripted Data Source? How can we process the flat files all in one? The answer is using esProc in Birt.

Let’s take an example to introduce the implementation process:
In this example, employee sales information is stored in sale.csv, and employee information with dates greater than 2015-03-02 needs to be queried based on input parameters.

sale.csv data are as follows:


Here we show how to use parameters for CSV data source in birt.

The integration of BIRT with esProc is not introduced here. Please refer to How to Call an SPL Script in BIRT.

  Step 1: Add an esProc JDBC data source.


  Step 2: Add the dataset and write the SQL query CSV file directly.

  Query text:


  Report parameter:


  Set dataset parameters and link them to report parameters:


  Step 3: Create a report

  The report is designed as follows:


  Step 4: WEB preview, input parameters, preview results:

  (1)input parameter:Date 2015-03-02



For more examples, procedure text files refer to the following Structured Text Computing.

esProc provides JDBC driver, and can be easily integrated with BIRT and other reporting tools. Please refer to How to Call an SPL Script in BIRT

Read Getting Started with esProc to download and install esProc, get a license for free and find related documentation.