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.
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.
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.
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.
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.
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, 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.
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.
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.
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.
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.

Template Download
Checkbox
1. Data Entry Page
You can click to download the template: Default Value Setting for a Checkbox Widget - Data Entry Page.cpt.
2. Parameter Page
You can click to download the template: Default Value Setting for a Checkbox Widget - Parameter Page.cpt.
Checkbox Group
1. Data Entry Page
You can click to download the template:
Default Value Setting for a Checkbox Group Widget - Data Entry Page - Array.cptDefault Value Setting for a Checkbox Group Widget - Data Entry Page - String.cpt
2. Parameter Page
You can download the template:
Default Value Setting for a Checkbox Group Widget - Parameter Page - String.cptDefault Value Setting for a Checkbox Group Widget - Parameter Page - Array.cpt