To initialize a value, all you have to do is allocate the control variable.

For example, for a calculated control:

// Calculate the price IOT of the current productCALC_MyCalculatedControl = Product.Price * 1.196

Remark on calculated controls: If the control is automatically filled by the report (calculation from a control or item found in the report), no value should be assigned by programming to the "Calculated" control.

Special case: Check Box control

To initialize a check box, all you have to do is assign the variable of the "Check Box" control. By default, no option is checked when a check box is displayed.

To check an option in a check box, use the following syntax:

<Name of Check Box> = 1<Name of Check Box> = True

To uncheck an option in a check box, use the following syntax:

<Name of Check Box> = 0<Name of Check Box> = False

For example:

// Assign the value of a check boxCBOX_MyCheckBox = True

Special case: Image control

To display an image file in an "Image" control, a simple assignment is sufficient.