I. Overview
1. Learning video
This article learning video:Insert Row Policy
2. Problem description
For the data entry template, the cell of the newly inserted row or column can be a null value, a custom value, or inherit the value of the previous cell. So how should it be set?
3. Solutions
You can set the Insert Row Policy for the cell. The policy provides 3 schemes: NULL, Default, Original as shown in the figure below:
The description of the three policies is as follows:
Null : The cell of the newly inserted row or column is empty, which is the system default option.
Default : Enter a custom value, and when inserting a new row or column, the cell will fill in the value by itself. You can use a formula.
Original : The new cell will inherit the content of the original cell, which is generally applicable to the cell defined by the formula. The formula of the cell will be retained when inserting a row or column.
II. Examples
1. Design report
1) Create a new database query dataset ds1
The SQL statement is: SELECT * FROM Sales
2) Design the filling form
Insert text widgets into cells A3 and B3, insert number widgets into cells C3, D3, and E3, and insert formula into cell F3: C3-D3-E3, as shown in the figure below:
3) Add a button widget to the G3 cell
select Insert Row for the G3 button type, select A3 for the Specified Cell, and set the Number of rows inserted to 1 row, as shown in the following figure:
2. Set the policy
Here we will introduce the use of 3 policies respectively, and demonstrate the actual effect of each policy.
1) Null
Null is the default option, that is every time a new row is inserted, the grid is blank. Set the Insert Row Policy of ID, Sales volume, Selling cost, Other expenditures to null values, as shown in the following figure:
2) Default
The default value is to define the content of the cell when adding a row by defining a String, Integer, Double-Precision, Date, Boolean or Formula, as shown in the following figure:
Set the Default value of the region as a string and fill in North America, as shown in the following figure:
3) Original value
Set the Insert Row Policy of Income to the Original value, so that the newly added cell inherits the original formula, as shown in the following figure:
3. Effect preview
1) PC terminal
Save the template and click Data Entry Preview. The effect is shown in the figure below:
2) Mobile
III.Template download
The completed template can be found in: %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Form\LineForm\Insert_row_policy.cpt
Click to download the template:Insert_row_policy.cpt