Query Association Widget

  • Last update:December 30, 2024
  • Overview

    Version

    Report Server VersionPlugin Version
    11.0

    V1.0

    Application Scenario

    To determine which options need to be selected from drop-down boxes or drop-down checkboxes, you may need to refer to additional fields in the dictionary table. To achieve a similar effect, the original solution is to re-enter data in a pop-up box by JS, which is, however, troublesome and time-consuming especially in numerous scenarios using this solution.

    This document introduces a solution using the Query Association Widget plugin, offering a simple workflow and higher time efficiency, as shown in the following figure.

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

    Notes

    1. The plugin is not supported on mobile terminals.

    2. The plugin does not support new frontend styles.

    3. The plugin does not support the Widget Display Enhancement function.

    4. The query association widget can be used on the parameter panel and in cells, while you cannot assign values to the widget inserted in a cell.

    Plugin Introduction

    Plugin Installation

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

    For details about how to install plugins 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 drop-down tree widget.

    The following figure shows the new functions of the query association widget.

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

    The following table describes the setting items.

    Setting ItemDescription
    Associated Main Widget Name

    Name of the widget that receives the returned value from the query association widget.

    Associated Table Configuration

    Option to be bound to the query association widget. This item must be configured, otherwise, the widget will not display any option.

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

    Referenced Field: field to which you refer for filtering when you need to select an option from the query association widget.

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

    Support Multi-Selection

    Whether to allow you to select multiple options from the query association widget. If Support Multi-Selection is selected, you can select multiple options.

    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 query association widget.

    Example

    Example Scenario Description

    Except for all orders of a specific customer, you also want to query several specific orders placed by the same customer within a certain time period.

    To achieve this, you can use Query Association Widget to obtain the required order IDs through filtering by fields such as Customer ID and Order Date.

    Data Preparation

    Create the following two datasets:

    Order: SELECT * FROM Orders

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

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

    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 ',', as shown in the following figure.

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

    3. Configure other widgets as required, which is not elaborated on here.

    Designing the Report Body

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

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

    Effect Display

    Click Data Entry Preview. The following figure shows the effect.

    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