Configure Controls

Add a Control

To add a control to a report, drag the control from the Control Bar to a band that will contain controls, like the Detail band. Scroll the Control Bar to see more controls.

Drag a control from the Control Bar and drop it on a band

If two controls overlap each other in the layout (), they are shaded red.

Similarly, if a control spans a band or margin boundary (), the control is shaded red.

Add a Data Field

To add a data field to a report, drag the field from the Field List to a band that will contain data, like the Detail band. Dynamic controls have a database icon in the upper, right corner.

Drag a data field from the Field List and drop it on a data band

Alternatively, you can bind a data field to an existing Label control in the layout. If you know the name of the field, you can type the name, surrounded by square brackets, into the Label control's Actions | Expression setting, for example, [STATE_NAME]. Otherwise, follow the procedure below to use the Expression Editor to select the field.

To bind a data field to a Label control:

  1. Select the XRLabel control.

  2. In the Properties panel, expand Actions.

  3. Click the icon in the Expression box to open the Expression Editor.

  4. Select Fields () and then double-click the field that you want to bind to the label ().

    The expression will be created ().

    Expression that accesses the STATE_NAME field

  5. Click OK.

    The data field appears in the XRLabel control's Expression setting.

Select a Control

Use any of the following methods to select a control:

When a control is selected, its handles show.

Selected Label control

Delete a Control

To remove a control from a report, select the control and press Delete on your keyboard or click Delete in Report Explorer.

Deleting a Panel control or Table control deletes the controls in the panel or table.

Properties of Controls

All control settings can be configured in the Properties panel. To configure a control's properties, first select the control. The Properties panel shows the properties for the currently selected control.

Some settings can also be configured in the layout. For example, you can double-click a Label control in the layout and type the text directly into the control.

Name

To rename a control, configure the control's Design | Name setting in the Properties panel. The name can contain letters, numbers, and the underscore character. It cannot contain spaces or special characters. The name appears in the Properties panel and Report Explorer.

Location and Alignment

Use any of the following methods to adjust the location of a control:

Draw Order

The order of controls in Report Explorer determines the front-to-back order that controls are rendered. A control appears in front of the controls that are below it in the hierarchy. You can use this fact to configure the draw order of overlapping controls.

To configure the draw order, click Bring to Front or Send to Back in the Actions section of the Properties panel. Alternatively, open Report Explorer and drag the controls one at a time to their new position in the hierarchy. If you want control 1 to appear in front of control 2, place 1 higher in the hierarchy than 2.

Typically, controls are re-ordered within a panel or band. Dragging a control to a different panel or band not only changes the draw order, it moves and resizes the control in the layout.

North arrow below the green square in the hierarchy () and above the green square ()

Size

Use any of the following methods to adjust the size and proportions of a control:

Appearance Properties

The settings in the Appearance section of the Properties panel enable you to configure a control's border, background color, and padding. If the control contains text, you can also configure the text formatting.

Inherit Settings from the Band or Report

Reports, bands, and certain controls have Appearance settings in common. For example, a report, Detail band, and Label control all have settings to configure the font, padding, and border. These repeated settings provide an inheritance hierarchy. By default, controls inherit the settings from bands and bands inherit them from the report. This enables you to configure values at a higher level for controls to inherit, which saves configuration time and ensures styling consistency.

Initially, a blank report and its bands use the same (factory default) Appearance settings. When you add a control to the report, it inherits those settings. If you then change an Appearance setting at the report level, all the controls in the report inherit the new value, as do any new controls that you add. Now if you change a setting at the band level, the controls in the band inherit the band's new value.

You can override a setting's report-level configuration by configuring the setting at the band level, and you can override the band-level configuration by configuring the setting at the control level. The lowest setting that you have explicitly configured is used.

The rules of inheritance are as follows:

To reset a setting to its factory value, click the icon to the right of the setting and select Reset. This re-enables the control's ability to inherit settings. Manually reconfiguring a setting to its factory value does not re-enable the control's ability to inherit.

Location of the icon to reset a setting

Controls that are contained in a Panel control or table cell can inherit settings from the panel or table cell. In this case, controls inherit from panels or table cells, panels and table cells inherit from bands, and bands inherit from the report.

Example

You want to use Arial as the font throughout a report. You select the report and set the Font | Font Name setting to Arial. You are careful not to change the Font Name setting for any bands or controls. All the controls in the report inherit the font from the report.

The report has a Report Header band that contains a title and some corporate information. You want all the text in the Report Header band to be blue. You select the Report Header band and configure the Foreground Color to be blue. You do not change the Foreground Color setting for any of the Report Header's controls, so they inherit the color from the band.

The title is the largest text in the report. No other control uses that text size, so you configure the Font | Font Size setting at the control level.

Background Color

To adjust the color and transparency of a control's background, open the Appearance | Background Color drop-down panel, and select the color and transparency.

Depending on the configuration, some types of control may not show any background. For example, if the image in an XRPictureBox control fills the entire control, no background will show.

If you add padding to a control, the padded area will show the background color.

By default, controls have a fully transparent background, so the background color does not show.

Border

To configure a border for a control, configure the following Appearance settings:

Padding

Padding defines the location of a control's contents within the control.

To configure padding for a control, expand the Appearance | Padding section and configure the Left, Right, Top, and Bottom settings in pixels.

Text Formatting

Controls that show text, like the XRLabel and XRTable controls, have settings to configure the Appearance of the text.

The text formatting settings are as follows:

Behavior Properties

If a control gets its value at run time, you may not know in advance how much space the contents will require. The settings in the Behavior section of the Properties panel enable a control and its contents to resize or reformat at run time. Behavior settings enable you to configure the formatting of dynamic controls. Some Behavior settings also work for static controls, for example, Angle and Word Wrap.

Anchoring

You can anchor a control to one or more edges of its parent container using the Behavior | Anchor Horizontally and Behavior | Anchor Vertically settings. When a control is anchored and the parent container's size changes, the control maintains its position relative to the container edge(s) that it is anchored to. The control may move or resize to maintain its position.

The options are as follows:

Horizontally anchored Label controls in a Panel control

Anchor Horizontally

Distance that remains fixed when Anchor Horizontally is set to Left.

Distance that remains fixed when Anchor Horizontally is set to Right.

  & 

Distances that remain fixed when Anchor Horizontally is set to Both. The control is resized as needed to keep these distances constant.

 

 

     
     

 

Vertically anchored Label controls in a Panel control

Anchor Vertically

Distance that remains fixed when Anchor Vertically is set to Top.

Distance that remains fixed when Anchor Vertically is set to Bottom.

  & 

Distances that remain fixed when Anchor Vertically is set to Both. The control is resized as needed to keep these distances constant.

 

 

     
     
     

Angle

The Behavior | Angle setting specifies the angle in degrees to rotate the text in a control that contains text. The angle is measured counter-clockwise.

Auto Width

When Behavior | Auto Width is enabled, the width of the control automatically adjusts to fit the contents. If the Word Wrap setting is enabled, the width can only decrease, not increase.

The Auto Width setting is useful for dynamic controls. It ensures that a data field's text is shown in full, without being limited by the control's dimensions.

The behavior of Auto Width depends on the Text Alignment setting. If the text is left aligned, the control is resized at its right end. If the text is right aligned, the control is resized at its left end. If the text is center aligned, the control is resized at both ends.

Auto Width does not work when Text Trimming is configured.

Can Grow

When Behavior | Can Grow is enabled and the control's contents are too large for the control, the height of the control automatically increases to fit the contents. Word Wrap or Multiline must also be enabled. If there are other controls below the control that grew, they are moved down to prevent overlapping.

The Can Grow setting is useful for dynamic controls. It ensures that a data field's text is shown in full, without being limited by the control's dimensions.

If you disable Can Grow and the contents are too large for the control, the contents are cut off. You can use the Text Trimming setting to configure how text is trimmed.

Can Grow does not work when Anchor Vertically is set to Bottom or Both.

Can Grow does not work when a non-zero Angle is configured.

Can Shrink

When Behavior | Can Shrink is enabled and the control’s contents don't completely fill the control, the control's height automatically decreases to fit the contents. If there are other controls below the control that shrank, they are moved up to prevent leaving a blank space.

Can Shrink does not work when Anchor Vertically is set to Bottom or Both.

Can Shrink does not work when text is displayed at an angle.

Keep Together

The Behavior | Keep Together setting specifies whether a control can split horizontally across pages. When Keep Together is enabled, if the control's contents cannot fit in the available space on the page, the entire control is pushed to the next page.

When you enable Keep Together for one control in a band, the other controls in the band behave as if they have Keep Together enabled. You can explicitly enable Keep Together for all the controls in a band by configuring the Keep Together setting at the band level.

Multiline

The Behavior | Multiline setting specifies whether carriage returns and new lines in the text are allowed. When Multiline is enabled, the Actions | Text setting allows multi-line entries. When Multiline is disabled, Actions | Text allows a single line of text.

Text Fit Mode

The Behavior | Text Fit Mode setting allows the font size to increase or decrease to fit the text to the control.

The options are as follows:

Text Fit Mode is not available when Can Grow, Can Shrink, or Word Wrap is enabled.

Text Fit Mode does not work when a non-zero Angle is configured, Auto Width is enabled, or Anchor Horizontally or Anchor Vertically is set to Both.

Word Wrap

When the Behavior | Word Wrap setting is enabled and the text is too long to fit on a single line, the control displays the text over multiple lines. The control must be tall enough to accommodate multiple lines or have Can Grow enabled.

© 2018 Latitude Geographics Group Ltd. All Rights Reserved.

Documentation Version 5.2