Default Value for Checkbox Widget and Checkbox Group Widget

  • Last update:March 25, 2025
  • Overview

    Version

    Report Server Version

    Functional Change

    11.0

    -

    Function Description

    On the parameter or data entry page, the checkbox in the added Checkbox Widget or Checkbox Group Widget is deselected by default. If you want it or multiple checkboxes in Checkbox Group Widget to be selected by default, how can you realize that?

    The following introbuces the specific setting methods and effects of the default values of Checkbox Widget and Checkbox Group Widget on the parameter page and the data entry page.

    Default Value Setting for Checkbox

    Data Entry Page

    Select the cell, click Widget Setting on the right of the page, add Checkbox Widget, and enter the text true in the corresponding cell. Click Data Entry Preview, and the checkbox is selected by default, as shown in the following figure.

    image 28.png

    Parameter Page

    Choose true > Boolean in Widget Value after adding Checkbox Widget on the parameter page. Click Page Preview, the checkbox is selected by default.

    image 29.png

    Default Value Setting for Checkbox Group

    Data Entry Page

    Select the cell, click Widget Setting on the right of the page, and add Checkbox Group Widget.

    Set Data Dictionary of the widget to Database Table, select FRDemo as Database, select STScore in Select Database Table, and ensure that Actual Value and Display Value are both in the CLASSNO column of the class. Preview the checkbox which  has four options: Class1, Class2, Class3, and Class4.

    image 30.png

    Set Return Value Type of Checkbox Group Control  divided into Array and String as follows. The default value setting for the two types of return values is different.

    String as Return Value Type

    Select the widget, select String under Widget Setting > Attribute > Advanced > Return Value Type, select  Delimiter as comma, Initializer as single quotation mark, and Terminator as single quotation mark, as shown in the following figure.

    image 31.png

    That is, when a single value like Class1 is selected in the checkbox group, the result returned is Class1. When multiple values like Class1 and Class2 are selected, the result returned is Class1,Class2.

    When one value is selected by default, enter a default value in the cell as 'Class1'. When multiple values are selected by default, enter multiple default values in the cell as 'Class2,Class3,Class4', and click Data Entry Preview. The following figure shows the effect.

    image 44.png

    image 41.png

    Array as Return Value Type

    Select the widget, select Array under Widget Setting > Attribute > Advanced > Return Value Type.

    image 38.png

    When one value is selected by default, enter a default value in the cell as Class1. When multiple values are selected by default, enter multiple default values in the cell as Class2,Class3,Class4, and click Data Entry Preview. The following figure shows the effect.

    image 37.png

    image 34.png

    Parameter Page

    Similar to the data entry page, the parameter page also has two return value types of the checkbox group: String and Array.

    The setting process is basically the same as the data entry page. Add Checkbox Group Widget on the parameter panel, and set Data Dictionary of the widget to Database Table. Select FRDemo as Database, and select STScore as database table. Actual Value and Display Value are both in the CLASSNO column. The following figure shows the steps.

    image 45.png

    String as Return Value Type

    Select the widget, select String under Widget Setting > Attribute > Advanced > Return Value Type, select Delimiter as comma, Initializer as single quotation mark, and Terminator as single quotation mark, as shown in the following figure.

    image 46.png

    When one value is selected by default, you can enter the string 'Class1' in Widget Value. When multiple values are selected by default, you can enter the string 'Class2,Class3,Class4' in Widget Value. The following figure shows the effect.

    image 52.png

    image 49.png

    Array as Return Value Type

    Select the widget, select Array under Widget Setting > Attribute > Advanced > Return Value Type. When one value is selected by default, you can enter the string Class1 in Widget Value. When multiple values are selected by default, enter the string Class2,Class3,Class4 in Widget Value. The following figure shows the effect.

    image 58.png

    image 55.png

    iconNote:
    The default value must be the actual value.

    Template Download

    Attachment List


    Theme: Parameter
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    9s后關閉

    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