Default Value of a Widget

  • Last update:June 08, 2025
  • Overview

    Version

    Report Server VersionFunctional Change
    11.0/

    Function Description

    In some cases, you may need to set a default value for a widget. For example, you need to set a default query result during initialization when filtering and querying data in a report, or you need to write a default value during data entry. So how to set a default value for a widget?

    To assign a default value to a widget, you can assign the value to the widget directly. You can also assign the value to the parameter directly if the parameter is bound to the widget. Since the parameter is bound to the widget, assigning the value to the parameter means assigning the default value to the widget.

    Value Assigning Method

    Default Value of the Widget

    You can set a default value for the widget on the Attribute panel of the widget, as shown in the following figure.

    If the widget is a data entry widget, you can enter the value directly in the cell where the widget is located, as shown in the following figure.


    Default Value of the Parameter

    If the parameter is bound to the widget, assigning a value to the parameter means assigning a default value to the widget. Therefore, to assign a default value to the widget, you can assign the default value to the parameter if the parameter is bound to the widget. 

    iconNote:
    The format of the default value of the parameter must be the same as that required by the widget. For example, if the default value of the drop-down checkbox is New York;California, the default value of the parameter should also be New York;California.

    3(1).png

    Example

    Data Entry Widget

    Application Scenario

    In most cases, you want the initial value to exist in the widget before data entry on the data entry page. The initial value is actually the default value of the data entry widget, as shown in the following figure.

    Implementation Method

    You can enter the default value in the cell where the widget is located, as shown in the following figure.

    Parameter Widget

    Application Scenario

    In most cases, you want to display the report content according to the default value on the parameter panel before you click the query button, as shown in the following figure.

    Implementation Method

    Set the default value when you define the template parameter, as shown in the following figure.

    Select the parameter widget on the parameter page, choose Attribute > Advanced, and set the default value in Widget Value, as shown in the following figure.

    During report preview, if you add the initial value of the parameter to the URL, the value in the URL will be displayed on the parameter page. For example, if you access a report by the URL http://localhost:8075/webroot/decision/view/report?viewlet=GettingStartedEN.cpt&Region=California, the value of the widget on the parameter page is the value in the URL, as shown in the following figure.

    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