Paradigm Support Desk

Report Designer Label Control

The most basic Label control is intended to display text in your report. It can represent static or dynamic text, or both. In addition, it can be used to calculate standard summary functions across a data field. The Labels text can only be formatted as a whole. So, if it's required to differently format parts of text, use the Rich Text control.

After a Label is added to a report, you can customize its text, appearance and other properties, which can be accessed in the Property Grid. The most important properties are also available via a control's Smart Tag, which makes it easy to perform common operations. And, the Formatting Toolbar allows you to easily adjust a Labels text formatting.

In the Property Grid, the Label control's properties are divided into the following groups:

1. Appearance

  • Background Colour
    Specifies the background colour for the control. This option is also available in the Formatting Toolbar.
  • Borders, Border Colour and Border Width 
    Specify border settings for the control.
  • Font
    Specifies the text colour for the control. This option is also available in the Formatting Toolbar.
  • Foreground Colour
    Invokes the Formatting Rules Editor allowing you to choose which rules should be applied to the control during report generation and define the precedence of the applied rules.
  • Padding 
    Specifies indent values which are used to render the contents of a Label.
  • Style Priority
    Specifies the priority of various style elements (such as background colour, border colour, etc.).
  • Styles
    Specifies odd and even styles for the control, as well as to assign an existing style to the control (or a newly created one).
  • Text Alignment
    Specifies the alignment of the controls text. This option is also available in the Formatting Toolbar.
  • Text Trimming
    Specifies the trimming mode applied to text when it does not completely fit into the label.
  • Location
    Specifies the floating-point representation of the coordinates of the control's upper-left corner.
  • Size
    Gets or sets the size of the control.
  • Right to Left
    Specifies the orientation of the XRLabel's content.

2. Behavior

  • Allow Markup Text
    Gets or sets whether you can use HTML-Style markup tags to format the control's text.
  • Anchor Vertically 
    Specifies the vertical anchoring style of a Label, so that after page rendering it stays attached to the top control, bottom control, or both. The property setting is useful for data-bound Labels located between upper and lower controls, which are allowed to resize depending on their contents.
  • Anchor Horizontally
    Specifies the horizontal anchoring type of a report control.
  • Angle
    Specifies the rotation angle of the text. The measurement unit is a degree, and the orientation is counter-clockwise. Since standard HTML does not support text orientation, this parameter is ignored when a report is displayed within a web page.
  • Auto Width
    Specifies whether or not a Label's width should be automatically determined based on its text.
  • Can Grow
    When this property is set to Yes, a Label's height can be automatically increased, if required, to display the text. If there are other controls below the current Label, they will be pushed down to prevent them from overlapping. Note that if a control overlaps the growing Label by even one pixel, it will not be pushed down by the growing Label.
  • Can Publish
    Specifies whether or not a report control is displayed in a printed or exported document.
  • Can Shrink
    When this property is set to Yes, and the text does not completely fill a Label, then the Label's height will be decreased to the height of its text. If there are other controls below the current Label, they will be moved up to fill the gap. Note that if a control overlaps the shrinking Label by even one pixel, it will not be pushed up by the shrinking Label.
  • Interactive Sorting
    Enables sorting a report in a Print Preview by clicking the XRLabel.
  • Keep Together
    Specifies whether the contents of a Label can be horizontally split across pages. In other words, if a Label occupies more space than remains on the page, this property specifies whether this Label should be split between the current page and the next, or whether it will be printed entirely on the next page. This property is in effect only when a Labels content does not fit on the current page. If it does not fit on the next page, then the Label will be split, irrespective of this property's value.
  • Multiline
    When this property is set to Yes, a Label processes newline characters found in the text to start a new line. For example, when editing a Label's text, you can insert a new line by pressing ENTER, and in this case, the Multiline property will be automatically set to Yes.
  • Process Duplicates Mode
    Determines the controls behavior when its data source contains consecutive repeating records. They can be processed as is (when the property is set to Leave), suppressed except for the first entry (Suppress) and suppressed with the blank space printed instead of the repeated records (Suppress and Shrink).When the MergeByValue and MergeByTag settings are selected, the control processes duplicate values by merging the identical content into a single line of text.
  • Process Duplicates Target
    Specifies whether a process duplicate values of the XRControl.Text or XRControl.Tag property.
  • Process Null Values 
    Determines whether to process Null (blank) values if they appear in the control's data source. They can be processed as is (when the property is set to Leave), suppressed (Suppress) and suppressed with the blank space printed instead of the blank records (Suppress and Shrink).
  • Scripts 
    This property contains events, which you can handle with the required scripts.
  • Text Trimming 
    Specifies the string trimming mode of the control's text.
  • Visible 
    Specifies whether the control should be visible in print preview.
  • Word Wrap 
    When this property is set to Yes, text entered into the multiline Label is wrapped to the next line if it doesn't fit the line or comes across a newline character. If the property is set to No, text entered into the multiline Label will be displayed on the same line until a newline character is entered.

3. Data

  • Accessible Description
    Gets or sets the description of a control used by assistive technologies.
  • Null Value Text
    Specifies the text shown by the XRLabel when the value of its bound data field is null.
  • Summary
    Allows you to perform calculations (summary, max, min, average, etc.) over a data field.
  • Tag
    This property allows you to add some additional information to the control; for example its id, by which it can then be accessible via scripts. If the current report has a data source , the Tag property can be bound to a data field obtained from the data source. To do this, expand the (Data Bindings) property and in the Tag.Binding drop-down selector, select the required data field.
  • Text
    Allows you to define a line of static text to be displayed. To type several lines of text, click the control's Smart Tag, and in the invoked actions list, click Edit Text, or use the Lines property. Note that when a Label is selected in the designer, you may simply start typing the text and it will be automatically entered into the in-place editor. If the current report has a data source, the Text property can be bound to a data field obtained from the data source. To do this, expand the (Data Bindings) property and in the Text.Binding drop-down selector, select the required data field.
  • Text Format String
    Invokes the Format String Editor, allowing you to choose which rules should be applied to the control during report generation, and define the precedence of the applied rules.
  • XLSX Format String
    Specifies the native XLSX format string for the control's content, which is to be preserved when the report is being exported to XLSX. This format string is independent from the general value formatting.

4. Miscellaneous

  • (Name) 
    Determines a control's name, by which it can be accessed in the Report Explorer, Property Grid or via scripts.
  • Snap Line Margin
    Specifies the control's margins that are maintained when the control is aligned using snap lines.
  • Bookmark and Parent Bookmark 
    These properties are intended for the creation of a hierarchical structure within a report called a document map. For an explanation and help, refer to Add Bookmarks. If the current report has a data source, the Bookmark property can be bound to a data field, obtained from the data source. To do this, expand the (Data Bindings) property and in the Bookmark Binding drop-down selector, select the required data field.
  • Navigation URL and Navigation Target 
    Use the Navigation URL property to specify a URL for web browser navigation, when a user clicks a Label. The web browser displays a page in a window or a frame as specified by the Navigation Target property. Note that a URL should have an appropriate prefix (e.g. "http://"). You can create cross-references within the report by assigning the name of the target control to the Navigation URL property, setting the Navigation Target property to "_self". For more information, refer to Create Hyperlinks. If the current report has a data source, the Navigation URL property can be bound to a data field obtained from the data source. To do this, expand the (Data Bindings) property, and in the Navigation URL.Binding drop-down selector, select the required data field.

P
Paradigm is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.