Keyword Highlighting During the Fuzzy Query in the Text Widget

  • Last update:June 24, 2025
  • Overview

    Version

    Report Server VersionFunctional Change

    11.0

    /

    Problem

    When you perform a fuzzy query on a report, you want to highlight the fuzzy keywords in the data columns obtained by the query, as shown in the following figure.

    动图1.gif

    Implementation Method

    You can convert the keywords in the corresponding data columns to HTML labels with highlighted colors, and then display the keywords by HTML.

    Procedure

    1. Create a dataset query with the SQL statement SELECT * FROM Sales_Volume where 1=1   ${if(len(name)=0,"","and Salesperson like '%"+name+"%'")}, as shown in the following figure.

    1.png

    2. Design the report, drag the fields into the corresponding cells, select cell D2, and select Summary and Sum under Cell Element > Data Setting, as shown in the following figure.

    2.png

    3. Select cell B2, select Formula Form under Cell Attribute > Display, and set the formula to replace($$$,$name,"<font color='red'>"+$name+"</font>"), as shown in the following figure.

    3.png

    4. Select Display by HTML in Display Content under Cell Attribute > Others > Advanced, as shown in the following figure.

    4.png

    5. Add the corresponding widget to the parameter panel.

    Effect Display

    PC

    Save the template and click Pagination Preview. The effect is the same as that shown in section "Problem."

    Mobile Terminal

    The preview effects on the DataAnalyst app and the HTML5 terminal are the same, as shown in the following figure.

    动图2.gif

    Template Download

    For details, you can download the template Keyword Highlighting During the Fuzzy Query in the Text Widget.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