Query Association Widget Plugin

  • Last update:December 22, 2025
  • Overview

    Version

    Report Server Version
    Plugin VersionFunctional Change

    11.0

    V1.0

    /

    11.0

    V1.3

    Allowed you to select all options on the pop-up Associated Table for Query page of the widget.

    Supported the parsing of \n and other separators.

    Application Scenario

    To determine which option(s) to select from drop-down boxes or checkboxes, you may need to refer to additional fields in the data dictionary. The original solution uses JavaScript to populate the widget with data selected from a pop-up window. While the approach can achieve a similar effect, it is troublesome and time-consuming, especially in scenarios involving large amounts of data.

    This document introduces a solution that achieves the same effect by the query association widget. The approach can simplify the operation process and improve efficiency, as shown in the following figure. 

    2024-12-30_11-22-00.png

    Notes

    1. The widget is not supported on mobile terminals.

    2. The widget does not support display enhancement.

    3. The widget can only be used in general reprorts (CPT templates).

    4. If Parameter Panel/Toolbar is set to FR11 on the decision-making platform, the widget can only be preveiwed in the Data Entry Preview mode.

    5. The widget can be used on the parameter panel and in cells. However, for usage in cells, you cannot assign values to widgets in the expanded cells.

    Plugin Introduction

    Plugin Installation

    You can download the plugin at https://market.fanruan.com/plugin/ef7bd095-87a2-4ec7-ae3d-70b00d92c6ed.

    For details about how to install the plugin in the designer, see Designer Plugin Management.

    For details about how to install plugins on the server, see Server Plugin Management.

    Plugin Usage

    After the plugin is installed, Query Association Widget is added to the widget toolbar. You can drag the widget into the parameter panel, as shown in the following figure.

    2024-12-26_14-35-27.png

    Widget Attribute

    The attributes of the query association widget are similar to those of the button widget. For details, see Button Widget.

    The following figure shows the new functions introduced by the query association widget plugin.

    2024-12-26_14-37-36.png

    Configuration items are described in the following table.

    Configuration Item
    Description
    Associated Main Widget Name

    Name of the widget that receives the value returned by the query association widget

    Associated Table Configuration

    Options to be bound to the query association widget
    This item must be configured; otherwise, no option will be displayed in the widget.

    For details about how to set Type, Database, Mode, and Database Table, see Data Dictionary.

    Key Value Field: the field whose value will be returned to the associated main widget when an option in the query association widget is selected

    Referenced Field: the field to which you refer for filtering when you need to select an option

    2024-12-26_14-38-31.png

    Support Multi-Selection

    Supporting the selection of multiple options in the query association widget with Support Multi-Selection ticked

    The query association widget plugin of V1.3 and later versions supports one-click selection of all options. The checkbox for selecting all is only available after you tick Support Multi-Selection, as shown in the following figure.

    Count Per Page

    Number of rows (10 by default) displayed per page in the pop-up box

    Pop-up Box Height

    Pop-up Box Width

    Height (500 px by default) and width (750 px by default) of the pop-up box

    Return String

    Whether to return the value as a string to the main associated widget.

    The query association widget plugin of V1.3 and later versions supports the parsing of \n and other separators, as shown in the following figure.


    Example

    Example Scenario

    In addition to the order details of a customer, you also want to query the orders placed by the same customer within a similar time period.

    To achieve this, you can use the query association widget to filter for required order IDs based on fields such as Customer ID and Order Date.

    Data Preparation

    Create the following two datasets using SQL queries:

    Order: SELECT * FROM Orders

    Order Detail: SELECT * FROM Orders, OrderDetails_new WHERE Orders.'Order ID'= OrderDetails_new.'Order ID' ${if(len(ID) == 0,"","and Orders.'Order ID' in ('" + ID + "')")}

    Report Design

    Adding Widgets to the Parameter Panel

    Design the parameter panel, as shown in the following figure.

    2024-12-26_14-39-58.png

    1. Configure the query association widget, as shown in the following figure.

    2024-12-26_14-41-47.png

    2. For the drop-down checkbox widget, set Widget Name to ID, Returned Value's Type to String, and Separator to ',' (a comma enclosed in single quotes), as shown in the following figure.

    2024-12-26_14-50-42.png

    3. Configure other widgets as needed.

    Designing the Report Body

    Drag the corresponding fields into cells A2 to D2, as shown in the following figure.

    Effect Display

    Click Pagination Preview, as shown in the following figure.

    Screen Recording 2024-12-30 at 11.26.01 (1).gif

    Template Download

    For details, you can download the template: Query Association 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