FineReport report designer parameter, based on application scope, can be divided into: template parameter and global parameter; and based on application type, can be divided into: template parameter and data set parameter.

1. Description

FineReport report parameter, based on application scope, can be divided into: template parameter and global parameter; and based on application type, can be divided into: template parameter and data set parameter.

2. Division based on application scope

2.1 Template parameter

Template parameter in business intelligence means the parameter created in current template, which is defined in Template > Template Parameter. Template parameter is only available in current report and needs filter for data filtering. For details, refer to Template Parameter.

2.2 Global parameter

Global parameter means the parameter created in current project, which is defined in Server > Global Parameter with definition method same as that of template parameter. Global parameter is available in all project reports and needs filter for data filtering:

Note: All defined global parameters are saved in WEB-INF\resources\config.xml file. If the global parameter is same as the report parameter, the latter shall be used.

In addition: Parameters divided based on application scope should be used in combination with filter conditions.

2.3 Difference

Template parameters and global parameter have consistent application methods but differ in scope.

Global parameter: available in all templates under current project.

Template parameter: only available in current template.

3. Division based on application type

3.1 Template parameter

The parameter divided based on application type is same as that divided based on application scope.

3.2 Data set parameter

Data set parameter means the parameter added at the time when data set is added to the template. In general, in SQL query statements, dynamic parameters will be used for data filtering. Data set parameter, based on application scope, can be divided into template data set parameter and server data set parameter.

Template data set parameter

Template data set parameter means the parameter added in the template data set of current template, which is defined in Template Data Set > Database Query, which is only available in current report. For details, refer to Data Set Parameter.

Server data set parameter

Server data set parameter means the parameter added in the server data set, which is defined in Server Data Set > Database Query with definition method same as that of data set parameter. Server data set parameter is available in all reports of project.

Note: All defined server data set parameters are saved in WEB-INF\resources\datasource.xml. If the server data set parameter is same as the report data set parameter, the latter should be used.

3.3 Difference

Template parameter and template data set parameter have same scope but differ in application type. However, template parameter and server data set parameter are different both in scope and application type.

Template data set parameter: this kind of parameter directly works for the returned data set. Therefore, with this parameter definition, the data set you obtained is the data meeting conditions, requiring no setting of filter conditions. It only acts on current template.

Server data set parameter: server data parameter is similar to template data set parameter. However, the only difference is that it acts on all templates of the project and is available for direct call.

Template parameter: template parameter has no effect on the data set taken. That means, all required data will be taken out. Then, parameters will be called to filter the data in grid so that only required data will be present. In addition, template parameter only acts on current template.

Conclusion: For data set parameter, you can directly take out data meeting conditions. However, for report parameter, you need to take out all data and then obtain data of corresponding parameter after setting filter conditions. Therefore, if data is massive, data set parameter can improve access efficiency of report.

4. Sharing description

The global parameter and server data set parameter share same template. That means: in regardless of the number of templates, you only need to define the parameter once. However, during use, templates are independent from each other. It doesn’t mean that, after assignment of global parameters of one template at bs side, other templates can use this value.

With some simple examples, we will describe how to use Template Parameter , Data Set Parameter and Global Parameter.