How to use the web report designer report parameters (efreport.com)

Description: How variable is added to the report, showing the contents of the report by selecting the conditions here need to use report parameters. This course "Employee Information" table as an example, by age employees to find information.

The first step: understanding the report parameter

Click the menu bar "template" - "template parameters", the pop-up dialog box template parameter settings.

 

: Add a report parameter.

: Delete a report parameter.

Name: The name of the report parameters, you can use the variable names do.

Default: the value corresponding to the name.

Data type: string, integer, float, date, Boolean five types.

Control Types: whether the control type, text edit box, drop-down box, multiple choice drop-down box, pull down the tree, multiple choice drop-down trees, date fields, check boxes, drop-down box to customize nine kinds of control types.

Control Name: preview, control displays the name.

Step two: add a data source

Click on the data source , the data in the edit box set: "select * from employee information", add a data source "ds1".

The third step: the establishment of a worksheet

Data Source "ds1" drag in all datasets worksheet, the input register over the respective data cell, is provided to center the text, a border is added. For easy viewing of age, the most left in the data set to join the "age" data set, select "Ascending" sort attribute column "Advanced" in the last column B is hidden.

 

Step four: Set the template parameter

Click on the menu bar "template" - "template parameters", the pop-up dialog box template parameter settings. Click the new template parameter named "age1", "Default" setting "25", "Data Type" select "int", "control type" is set to "text edit box", "control name" is set to "minimum age".

Click the new template parameter named "age2", "Default" setting "40", "data type" selector "int", "control type" is set to "text edit box", "control name" is set to " maximum age. "

 

Step 5: Use template parameters

Select Data Source "ds1", click on the data source , data source editing pop-up window. The original statement is: "select * from employee information", now modified to: "select * from employee information where aged> = @ {age1} and Age <= @ {age2}", use "@ in surplus sail report { control name} "to represent variables.

Step Six: preview renderings

Click on the toolbar , preview renderings. Enter the age of the employee information displayed different ages.

 

Step six: Save the template

Save the template, the template named "report parameter."

 

Note: The parameter format must be a letter (the case) at the beginning or underscores, letters, numbers, underscores. It is not recommended to add all uppercase digital formats, such as: A1, B1, easily confused with the cell.

Provided pulldown or selected from the pull-down tree, tree, setting the data format of the source sub-layer can be specified by the template parameters specific parameters.

 

 

Figure, "level 1" data source is "ds2", "ds2" data source statement is "select provinces from city sales group by the provinces." "Level 2" is the data source "ds3", "ds3" data source statement is "select city from the city where sales Department = '@ {parentNodeValue}' group by the city" .

 

 

Wherein @ {parentNodeValue} represents the "level 1" data value of the actual data source.

@ {parentNodeValue} parameter only effective herein. Elsewhere use this data source is invalid.

 

Published 39 original articles · won praise 1 · views 10000 +

Guess you like

Origin blog.csdn.net/efreport/article/details/91350510