Getting FineReport of parameters

In most cases, we do not need to report all the data in the database are presented, but rather to filter out the data we want based on some conditions, this is the parameter query. FineReport the report is the use of dynamic parameters to filter data, real-time user interaction and data.

1. The parameter setting step

Parameter definitions : setting parameter name, add parameters to add different kinds of parameters depending on the actual situation.

Add controls bind data : FineReport parameter query, add parameters in the control panel, the control name and parameter names as its arguments passed to the control by the control value, modify the parameters to achieve the dynamic effect of worth, can be bound to data controls direct selection.

Parameter setting panel style : set the parameters of the interface position control, position parameter panel, background and so on.

2. Classification

According to its use can be divided into: template parameters and global parameters;

Different can be divided according to their use: the parameter data set and template parameters.

2.1 classified according to the scope of use

2.1.1 template parameters

Template parameters are parameters created in the current template, template> template parameter definition, can only be used in the current report, and must be combined with a filter to filter the data .

2.1.2 Global Parameters

Global parameters are parameters created in the current project, the server> Global parameter definition, define methods with the same template parameters, can be used in all reports under the project, it must be combined with a filter to filter the data.

Note: The definition of global parameters are stored in finedb of fine_conf_entity table, if the global parameters and the same template parameter, using the template parameter.

Another: Use according delineating parameters must be used with filters.

Template parameters and global parameters difference:

Consistent use template parameters and global parameters, but the difference between the two scopes.

Global parameters: current all templates in the project application can be used.

Template parameters: Only the current template can be used.

2.2 classified according to usage

2.2.1 template parameters

With the use of parameter range.

2.2.2 Data collection parameters

Dataset parameter refers to the parameter when adding a data set as a template add, generally refers to the use of dynamic parameters in SQL query statement to filter the data. The use of the parameter data set divided into:

1) template parameter data set

It refers to the current template parameter template data centralized added, is defined in the template> template data sets> database query, you can only use in the current report.

2) server dataset parameters

Is a parameter on the server add centralized data defined in the server> server data sets> database query, the same parameter definition methods and data sets can be used in all reports under the project.

Note: 1) define the parameters of the server data set are stored in the finedb fine_conf_entity table, if the server data set of parameters and the same set of data reporting parameter, the parameter data set using the report.

       2) the data set parameter is the data taken directly meet the conditions, and obtains the corresponding template parameters, then the parameters of all the data taken out by setting the filter condition data, so if the data set using the parameters where large volumes of data can improve the access efficiency report .

Attachment: All selected parameter is empty

Dataset parameters: SELECT * FROM = Order. 1. 1 $ {WHERE IF ( len (Area) == 0 , "" , "area and the owner = '" + Area + "'" )} 
Explanation: Query table in this order All fields conditions: when 1 = 1 true, execute $ {If this parameter length area zero, null, or equal to the owner region = parameter query}

Template parameters: the modified filter conditions, read the formula:

3. Parameter interface settings

3.1 whether to display parameter interface

Sometimes users want to be able to control their own whether to display parameter interface, users can access reports at the time, add the parameter after the URL & amp; __ pi __ = false to the control panel does not display parameters. By __pi__ parameter control

When access reports plus & amp behind URL; __ pi __ = false report can not force the screen display parameters (report definition set parameters and display parameters of the interface form);

例如:http://localhost:8075/webroot/decision/view/report?viewlet=GettingStarted.cpt&__pi__=false。

Note: before and after the two English pi are underlined.

Click to display the contents of the report before the inquiry 3.2

Enter edit mode parameters panel, set the hook in the Control Panel to property "does not display the contents of the report before clicking Search", set as shown below:

3.3 Other

Can set the parameters panel background, controls the position, size and the like.

4. The default date control value is set to null 

Modify the control value type [formula] and an input value to the control double quotation marks, as follows:

Set template parameters and common combinations: https://help.finereport.com/

Guess you like

Origin blog.csdn.net/Artemis1220/article/details/90696335