Solution for the Slow Fuzzy Query in the Drop-down Box

  • Last update:December 02, 2025
  • Overview

    Version

    Report Server VersionFunctional Change

    11.0

    /

    Application Scenario

    You want to increase the speed of the fuzzy query in the drop-down box when the data volume is large.

    Implementation Method

    You can use the text box to filter the data first, and then use the drop-down box for the fuzzy query through the widget bound with a data dictionary. In this way, the fuzzy query speed will be faster. The following figure shows the effect.

    1.3 实现思路.gif

    Example

    Template Creation

    Create a general report, as shown in the following figure.

    2.1 新建模板.png

    Data Preparation

    (1) Create a database query ds1, and enter the SQL statement SELECT * FROM STSCORE where name like '%${if(len(id)=0,"error",id)}%', as shown in the following figure.

    2.2 准备数据.png

    iconNote:
    The SQL statement means that if the text box is empty, the error string is used for the fuzzy query, that is, no data will be obtained. If the text box is not empty, the entered value is used for the fuzzy query.

    Template Parameter Adding

    Add a template parameter name, as shown in the following figure.

    2.3 添加模板参数.png

    Binding Parameters to Widgets

    (1) Enter the parameter panel editing page, and add the parameters id and name to the parameter panel, as shown in the following figure.

    2.4 参数绑定控件(1.png

    (2) Bind the parameter id to the text widget, and bind the parameter name to the drop-down box widget. The following example binds the parameter id to the text widget.

    2.4 参数绑定控件(2.png

    (3) Bind a data dictionary to the drop-down box widget, as shown in the following figure.

    2.4 参数绑定控件(3.png

    (4) Set the widget values of Labelid and Labelname to Fuzzy Query Input: and Name:. The following figure shows the effect.

    2.4 参数绑定控件(4.png

    Report Design

    (1) Enter text in cells A1 to F1, drag data columns into cells A2 to F2, and design the table style, as shown in the following figure.

    2.5 设计报表(1.png

    (2) Double-click cell A1 to set the filter condition. Set Available Column: to NAME and Operator: to Equal to, and select Parameter and $name from the drop-down lists, as shown in the following figure.

    2.5 设计报表(2.png

    Effect Display

    PC

    The following figure shows the effect on PCs.

    PC.gif

    Mobile Terminal

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

    monile.gif

    Template Download

    Download the completed template by clicking Solution for the Slow Fuzzy Query in the Drop-down Box.cpt.

     


    Attachment List


    Theme: 二次开发
    • 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