Overview
Version
Report Server Version | Functional Change |
---|---|
11.0.2 | Optimized fuzzy search logic of widgets. |
11.0.3 | Optimized fuzzy search triggering logic and searching node expansion logic of the drop-down tree widget. For details, see section "Functional Logic". |
11.0.6 | Optimized the logic of number of expanded nodes in fuzzy search of the drop-down tree widget. For details, see section "Functional Logic". |
11.0.10 | Modified the logic of matching letters in fuzzy search to be not case-sensitive. For details, see section "Functional Logic". |
11.0.11 | Optimized the matching logic to allow matching actual values and display values. For details, see section "Functional Logic". |
Functions
When you use widgets for data entry or query, it is inconvenient to look for values among too many options in the data dictionary. To solve this problem, FineReport provides the fuzzy search function to improve efficiency.
Fuzzy search is applicable to drop-down box, drop-down checkbox, and drop-down tree (single-select and multi-select) widgets.
Functional Logic
Matching Logic
1. Matching options based on Display Value and Actual Value set in Data Dictionary.
Matching Actual Value and Display Value | Only Matching Display Value |
The actual value is product type, and the display value is product name. If you enter the actual value, options can also be matched. | The actual value is product type, and the display value is product name. If you enter the actual value, options cannot be matched. |
2. Not case-sensitive when letters are matched.
Not Case-Sensitive | Case-Sensitive |
Enter adbc. Both options (ADBC and adBC) can be matched. | Enter adbc. Neither option (ADBC and adBC) can be matched. Only when the entered content is identical with the option, can they be matched. |
3. Numbers and letters in options will be seen as a whole in matching. Only when the order of the entered numbers and letters is identical with that in options, will they be matched.
Match Options Containing Search Content | Only Match Consistent Options |
Enter ABC, and the options ABDC and ADBDC will also be matched. | Enter ABC, and only options containing the continuous sequence of ABC will be matched. |
Matched Option Ranking Logic
1. In fuzzy search, the matched options are ranked by the degree of matching, with higher degrees of matching ranked higher in the order list. When the matching degree is the same, options are ranked by their order in Data Dictionary.
Rank by Orders in Data Dictionary | Rank by Matching Degree |
When you enter Oxford, even though it is identical with the option Oxford, the option is ranked last due to its order in Data Dictionary. | When you enter Oxford, the option Oxford is ranked first due to its highest matching degree. Other options with the same matching degree are ranked by their orders in Data Dictionary. |
2. In the drop-down tree widget, when sub-nodes are matched, the parent node will also be matched.
3. In the drop-down tree widget option matching, the higher the level of a node, the higher its ranking in the order list. Parent nodes matched directly will be ranked higher in the order list, but parent nodes matched due to their matched child nodes will be ranked last.
Rank by Levels of Nodes | Rank by Orders in Data Dictionary |
Enter Fruit. Options Dried Fruit and Tropical are matched. Tropical is matched due to its sub-node Dragon Fruit, so it is ranked last. | Enter Fruit. Options Dried Fruit and Tropical are matched. Tropical is ranked higher than Dried Fruit based on their orders in Data Dictionary. |
Nodes matched directly with the same level are ranked by the degree of matching.
Parent nodes matched due to their sub-nodes are ranked by their orders in Data Dictionary. For example, even though the entered content John is identical with the option John, the option Johnny is ranked higher than John in the list based on their orders in Data Dictionary.
Expansion Logic after Matching
1. To improve performance, in the drop-down tree widget fuzzy search, a matched parent node will only be expanded when its sub-nodes or lower level nodes are matched.
Expand | Not Expand |
---|---|
Enter Financial. The node Financial Department is matched and expanded. | Enter Financial. The node Financial Department is matched, but its sub-nodes are not matched, so Financial Department is not expanded. |
2. To improve performance, in the drop-down tree widget, only the first 100 matched nodes will be expanded by default.
Example
Drop-Down Box
English String
There are two options JOHN and ANNA. If you enter J, options containing J (only JOHN in this example) will be matched. If you enter N, options containing N (JOHN and ANNA in this example) will be matched.
Drop-Down Checkbox
The drop-down checkbox widget has the similar function to the drop-down box widget. The drop-down checkbox widget allows selecting multiple options, so you can use fuzzy search to search multiple options. For example, add a drop-down checkbox to the template, and set Data Dictionary as shown in the following figure.
Preview the template and use fuzzy search to search John and Alice.
Enter J in the drop-down checkbox. Options containing J (John, Jim, and Jerry) are matched.
After selecting John, John will appear in the checkbox. Enter A, and options containing A (Alice, Anna, and Lisa) will be matched.
Select Alice.
Drop-Down Tree
Fuzzy search in the single-select drop-down tree widget is the same as that in the drop-down box widget. Fuzzy search in the multi-select drop-down tree widget is the same as that in the drop-down checkbox widget.
Single-select drop-down tree
Multi-select drop-down tree