I. Overview
1) Problem description
At present, the fuzzy query function of the drop-down box widget will be separated to match multiple characters when matching. For example, if you enter ABC, the system matches the data that contains A, B, and C in the same order rather than the data that is connected with ABC. So how to achieve some accurate fuzzy search?
2) Implementation roadmap
The database like statement is able to achieve accurate fuzzy search function, it can use the widget data dictionary linkage to achieve the requirements.
Note: This scheme only supports the drop-down check box, there is no effective scheme for the drop-down check box.
II. Example
1. Data preparation
1) Create a new dataset ds1, and the database query statement is:SELECT * FROM Client WHERE CustomerID like '%${abc}%',as shown below:
2) Create a new dataset ds2, and the database query statement is:SELECT * FROM Client,as shown below:
2. Report design
1) Drag two label widgets and two drop-down box widgets into the parameter panel, and set the name of the first drop-down box widget to abc, the name of the first label widget to Fuzzy query result, and the name of the second drop-down box widget to Fuzzy query results are contained in the drop-down list box, as shown below:
2) The drop-down box data dictionary is set to ds1 and ds2 respectively, and the actual value and display value are bound to the customer ID field, as shown below:
3) All widgets in the drop-down box are checked to Allow Edit, as shown below:
3. Effect preview
1) PC
Save the report, click Pagination Preview, type BL in the first drop-down box widget and the query results are BLAUS, BLONP.Enter BL in the second drop-down box widget,and the query results are BLAUS, BLONP, BOLID, as shown below:
2) Mobile
The end effect of App and HTML5 is the same, as shown below:
III. Download the template
See: %FR_HOME%\webroot\WEB-INF\reportlets\doc-EN\Parameter\Drop-down-box_fuzzy_search_for_exact_matching_scheme.cpt
Click to download thetemplate:
Drop-down-box_fuzzy_search_for_exact_matching_scheme.cpt