The Label control is available in Section reports and is very similar to the Section report's TextBox control, just that the Label control takes only the static text. The main difference between the two controls is the Angle property of the Label control, and the following properties of the TextBox control: CanGrow, CanShrink, CountNullValues, Culture, DistinctField, OutputFormat, SummaryFunc, SummaryGroup, SummaryRunning, and SummaryType.
Edit Mode
Double-clicking the Label control changes its mode to edit mode. In the edit mode, you can enter text directly in the control, or you can enter text in the Text property in the Properties panel.
You can format text in the Label control in edit mode using the designer toolbar, or you can modify properties in the Properties panel. Formats apply to all of the text in the control. Text formatting changes from the Properties panel immediately appear in the control, and changes made in the toolbar are immediately reflected in the Properties panel.
Clicking the four-way arrow selects the control and reveals its properties.
Property | Description |
---|---|
Angle | Gets or sets the angle (slope) of the text within the control area. Set the Angle property to 900 to display text vertically. |
CharacterSpacing | Gets or sets the space between characters in points. |
DataField | Gets or sets the field name from the data source to bind to the control. |
HyperLink | Gets or sets a URL to which the viewer navigates when the user clicks the label at run time. The URL becomes an anchor tag or a hyperlink in HTML and PDF exports. |
LineSpacing | Gets or sets the space between lines in points. |
MinCondenseRate | Specifies the minimal rate of the text horizontal scaling in percentages. Should be between 10 and 100. |
MultiLine | Gets or sets a value indicating whether to allow text to break to multiple lines within the control. |
ShrinkToFit | Gets or sets a value indicating whether to decrease the font size so that all of the text shows within the boundaries of the control. |
Style | Gets or sets a style string for the label. |
Text | Gets or sets the text to show on the report. |
TextJustify | Specifies how to distribute text when the Alignment property is set to Justify. With any other Alignment setting, this property is ignored. |
VerticalAlignment | Gets or sets the vertical position of the label's text within the bounds of the control. |
VerticalText | Indicates whether to render the label's text vertically. |
WrapMode | Indicates whether a multi-line label control wraps words or characters to the beginning of the next line when necessary. |
In edit mode, you can use the following keyboard shortcuts.
Key Combination | Action |
---|---|
Enter | New line. |
Alt + Enter | Saves modifications and exits edit mode. |
Esc | Cancels modifications and exits edit mode. |