Default Value of Parameter Widget

  • Last update:  2021-03-04
  • I. Description

    As shown in the parameter interface as shown in the figure below, we often hope to display the report content according to the default value on the parameter interface before clicking the query button.

    The default value you see is actually the control value of the parameter widget.

    1.png

    II. Source of the Default Value of the Parameter Widget

    How to set the initial value of the parameter widget in the parameter interface shown in the figure above? There are three ways:


    2.1 Set parameter default values when defining parameters

    Then define the parameter interface, the parameter widget will automatically obtain the parameter default value as the default initial value of the widget.

    For example, when the template parameter p1 is defined, the default value is set to "East China". When the parameter interface is defined, the widget value of the p1 parameter widget defaults to "East China", and the dataset parameters are the same:

    Note: It is necessary to set the parameter default value first, and then define the parameter widget, the initial control value is the parameter default value. If the widget has been defined, then modify the parameter default value. At this time, the widget value will not change, that is, the initial value on the parameter interface will not change.

    Therefore, if you want to modify the default value of the parameter interface, you can directly modify the widget value of the parameter widget.


    2.2 Do not set default values when defining parameters

    When defining the parameter interface, set the default value in the widget value property of the parameter widget.

    If you define the template parameter p1, do not set the default value. After defining the parameter interface, select the parameter widget in the parameter interface and set it in the attribute table of the Widget Settings>Attributes>Widget Value. The same applies to the dataset parameter.

    4.png

    Among them, the widget value of the parameter control has three representation types, string, bound field and formula. Strings and formulas are commonly used. For details on using formulas, please refer to Use formulas to assign default initial values to parameters.


    2.3 When accessing reports

    The URL is followed by the initial value of the parameter, and the parameter interface will display the value in the url.

    For example, to access the report http://localhost:8075/webroot/decision/view/report?viewlet=GettingStartedEN.cpt&Region=East China, the value of the widget on the parameter interface is the value in the URL:

    5.png

    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