Overview
Version
| FineReport Version |
|---|
11.0 |
Application Scenario
This document introduces common FAQs related to the actual and display values of parameter widgets and data entry widgets during template creation.
FAQs and Solutions
No Distinction Between Actual and Display Values During the Pagination Preview
Problem:
The formula if(B2 = min(B2[;!0], C2[;!0], D2[;!0]), "★" + round($$$, 1), round($$$, 1)) is used in the template. During the pagination preview, the template displays multiple numbers with ★ in one row, which does not match the condition of adding ★ only to the minimum value in one row. In other preview modes, the template effect is normal.

Cause:
During the pagination preview, the calculation logic is as follows:
First, in the French column, the system determines whether 89 is the minimum value among 89, 25, and 62. The result is false, and the system displays the original value (89).
Then, in the Math column, the system determines whether 25 is the minimum value among 89, 25, and 62. The result is true, and the system displays ★25.
Finally, in the English column, the system determines whether 62 is the minimum value among 89, ★25, and 62. Since the result is true (because the math score ★25 is now a string instead of a number), the system displays ★62.
Solution:
Add an auxiliary column E2. Set the value of E2 to min(B2[;!0], C2[;!0], D2[;!0]), and then modify the original formula to if(B2 = E2, "★" + round($$$,1), round($$$,1)).
Matching the Default Value with the Display Value of the Drop-down Checkbox in a Cell
Problem:
In the data entry report, a cell is bound to a drop-down checkbox widget, and the default value of the cell is a string composed of multiple values. During the preview, the display value corresponding to a single value needs to be displayed. If no operation is performed, the report effect is as shown in the following figure.

Solution:
(1) Method one: Select Display Widget Directly under Web Attribute > Data Entry Setting, click OK, click Save, and click Data Entry Preview, as shown in the following figure.

(2) Method two: If you do not want to display the widget, you can choose Display > Data Dictionary for the cell. Set Actual Value to ProductID and Display Value to Product_name, enter the formula =split(A2,",") in B2 and =split(A3,",") in B3, and set Expansion Direction to No Expansion for B2 and B3. Because the values of cells A2 and A3 are in the string format, and the returned values of the drop-down checkbox widget are in array format, the split function is needed to convert the string to a string array, as shown in the following figure.

Note:Since this is a data entry report, the actual value instead of the display value is entered into the database. When you use either of the above two methods for data entry and set the data entry attributes, to prevent data in the same cell from being entered into multiple rows, you need to use the JOINARRAY function to convert the values of cell B3 to be ones in the string format, or change the returned values' type of the drop-down checkbox to the string.
Failure of Conversion Between the Actual Value and the Display Value of a Drop-down Tree in a Cell
Problem:
You have set a default value, and configured an actual value and a display value under Display > Data Dictionary for the drop-down tree widget in a cell. But the default value is not converted to the display value as configured and is still displayed as the actual value during preview.

Cause:
When you set the default value for the drop-down tree using the above format, the default value is a string. In this case, when the actual value is converted to the display value, the string is deemed as a whole to match the data, so the corresponding display value cannot be matched.
Solution:
(1) Use data in the array format (for example, =[[1,11,111],[1,11,112]]) as the default value for the drop-down tree, so that the actual value can be matched with the display value normally.

(2) Configure the Display settings for the cell, as shown in the following figure.

(3) Save the template and click Data Entry Preview.
Display Value Shown as the Actual Value for a Cell Drop-down Tree in Blur State
Problem:
You have configured a data dictionary (including an actual value and a display value) for the drop-down tree widget in a cell. When a value is selected in the widget, the corresponding display value is displayed. When the widget is in blur state, the actual value is displayed in the cell.
Solution:
For details, see Returning Display Values in a Drop-down Tree in a Cell.
Drop-down Box Widget in Blur State Displaying the Actual Value After You Select Another Linked Widget
Problem:
If the data dictionary bound to a drop-down box widget is a dataset with cell linkage, the drop-down box widget displays the actual value instead of the display value after you select another linked widget.
Solution:
For details, see Retaining the Display Value of the Widget in a Cell After Data Entry.
Abnormal Display of Values in the Drop-down Box
Problem:
When you use the REPLACE function to pass the default value to the widget:
The default values of the first 500 options in the drop-down box are displayed normally.
The display values of the options after the 500th in the drop-down box are displayed abnormally as the actual values.
For example, after you have converted 1 to one dollar using the REPLACE function, the display values of the options after the 500th in the drop-down box are displayed abnormally as the actual values.
Cause:
When the REPLACE function is used to pass parameters, up to 500 options can be obtained initially for the drop-down box. For the options after the 500th (such as 997, 998, and 999), their default values cannot be correctly recognized by the system, and therefore, are displayed as the actual values. When you expand the drop-down box and scroll the box to display data after the 500th option, the data after the 500th option will be obtained, and can be displayed correctly after you select them.
Solution:
Use the SPLIT function instead of the REPLACE function to pass parameters, avoiding the initial data retrieval limit.