パラメータウィジェットの既定値

  • 作成者:ayuan0625
  • 編集回数:10次
  • 最終更新:FRInternational 于 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: FineReport パラメータ
    既に最初
    既に最後
    • Helpful
    • Not helpful
    • Only read