BIRT passed parameter CSV data set

Source:
https://forums.opentext.com/forums/discussion/50068/set-report-parameters-with-csv-files-as-datasource#latest

Do SQL queries can specify the data set parameters for the data set, the data set parameters, can have a link to a report parameter, easy to operate in birt in. Of course, if you want to do queries against csv types of data files is very easy, just type CSV data set does not support the specified data set parameters, you want to achieve screening can only use the data sets filtering function, but also has some limitations when used. So, here to recommend you a nice thing - set calculator, easy to operate and easy to learn, not only to do but pass filter parameters, a lot of advantages.

Here we have to Birt reporting tools, for example, tell us about the implementation process:

In this example, an employee in sale.csv sale information storage in accordance with the input parameters need to query 2015-03-02 date is greater than the employee information.

sale.csv data are as follows:

userName,date,saleValue,saleCount

Rachel,2015-3-1,4500,9

Rachel,2015-3-3,8700,4

Tom,2015-3-2,3000,8

Tom,2015-3-3,5000,7

Tom,2015-3-4,6000,12

John,2015-3-2,4000,3

John,2015-3-2,4300,9

John,2015-3-4,4800,4userName,date,saleValue,saleCount

Rachel,2015-3-1,4500,9Rachel,2015-3-3,8700,4Tom,2015-3-2,3000,8Tom,2015-3-3,5000,7Tom,2015-3-4,6000,12John,2015-3-2,4000,3John,2015-3-2,4300,9John,2015-3-4,4800,4

Here we visit a local csv file, for example, describes how to use the parameter data sets of csv birt in.

About birt integrated set of solvers not be introduced, please refer to the " BIRT script calls the SPL ."

Step: Add resolver collector JDBC data sources.

1png

Step two: add data sets directly write SQL queries CSV file.

check sentence:

2png

Report Parameters:

3png

Set data set parameters and parameters associated with the report parameters do:

4png

Step 3: Create Reports

Report design as follows:

1png

Step Four: WEB preview, input parameters, preview the results:

(1) Input parameters: Time 2015-03-02

2png

3png


Guess you like

Origin blog.51cto.com/12749034/2465413
Recommended