The CheckBox report item is used to display both text and a check mark on a report.
The following image shows a CheckBox report item with its
CheckAlign property set to
TopCenter and its text aligned to
By default, the size of a CheckBox item is set.
To allow a CheckBox to expand vertically based on its contents, set the
CanGrow property to its default
To allow a CheckBox to shrink based on its contents, set the
CanShrink property to
True. By default,
False. The CheckBox will always enlarge to accommodate the first line of text even when
The textual part of the Checkbox report item supports embedded expressions for mail merge functionality.
Embedded expressions enable you to get and insert data-driven information directly into the
CheckBox.Text property to produce customized reports and mail merging.
In the following image, each CheckBox is initialized with the
CheckAlign property varying from
The check mark image depends on the value set in the
Value property. By default,
=false. At design time, you can initialize the
Value property with an expression which later at runtime is evaluated to one of the
System.Windows.Forms.CheckState values. For example,
=IsNull(Fields.Quantity, 0) > 100 will return
false and will check and uncheck the check mark respectively.
If your data fields return two or three distinctive values, which are not
false, you can change the
IndeterminateValue properties to match your field values directly.
FalseValue should be always set. If not, the
Unchecked states become indetermined and you cannot show the corresponding images and check states. Generally, the
FalseValue should be different. In the unexpected scenario where the two evaluate to the same value, the
FalseValue will be prioritized, and the
Checked state would become impossible to achieve.
If the checkbox
Valuemay take more than three values, all values that are different from the
FalseValuewill be evaluated to the
The following example assumes that you have a
Status field that has the
In this case, it is more convenient to use those values directly instead of trying to evaluate them as
false. To use the values directly, utilize the
The following image shows the final result.
- Using Embedded Expressions
- (API) Telerik.Reporting.CheckBox
- (API) CanGrow
- (API) CanShrink
- (API) CheckAlign
- Demo Page for Telerik Reporting
- Knowledge Base Section