Text widget fuzzy query keyword highlighting

  • Last update:  2021-10-20
  • I. Problem description

    When you perform fuzzy query on a report, the fuzzy keywords are highlighted in the data columns that you want to query. As follows:

    gif1.gif

    II. Solution

    In the corresponding data column, the included keywords are converted into HTML tags with highlighted colors, and then displayed using HTML.

    III. Solution steps

    1) Create data set query:SELECT * FROM Sales_Volume where 1=1   ${if(len(name)=0,"","and Salesperson like '%"+name+"%'")}

    1.png

    2) The report design is as follows. Drag the fields to the corresponding cell and set D2 to summary summation.

    2.png

    3) Set cell B2 Display - Formula Form. Formula is:replace($$$,$name,"<font color='red'>"+$name+"</font>")

    3.png

    4) Choose to display the content in HTML

    4.png

    5) Add corresponding widgets to the parameter panel and save the preview.

    IV. Preview the effect

    1)  PC

    Save the template and clickPagination Preview to achieve the effect shown in the description.

    2) Mobile

    1) App effect

    gif2.gif

    2) H5 effect

    gif3.gif

    V. Complete the template

    You have completed the template. For details, see%FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Parameter\Text_widget_fuzzy_query_keyword_highlighting.cpt.

    Click to download the template:

    Text_widget_fuzzy_query_keyword_highlighting.cpt



    Attachment List


    Theme: Parameter
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy