Overview
Version
| Report Server Version | Functional 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.
Note:![]()
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.
