Skip to main content
A newer version of this page is available. .

Manipulating Report Elements

  • 4 minutes to read

This document describes how to manipulate report controls in the Report Designer and customize the report’s layout.

Accessing Report Element Settings

A straightforward way to access a selected element’s settings using the Property Grid.

design-time-report-elements-property-grid

Clicking the gray area around the design surface selects the report.

design-time-selecting-report-property-grid

You can also use an element’s smart tag to access its most commonly used settings.

picture-box-sizing-mode-zoomimage

Smart tags are available for most report controls, bands and a report itself.

winforms-getting-started-master-keep-together-with-detail

In addition to properties, smart tags can contain context links enabling you to perform various actions.

report-smart-tag-open-import

These commands are also available in the Property Grid.

design-time-context-links-property-grid

Moving, Resizing and Cloning Report Elements

You can move report controls using the mouse in the same way you move other controls in Visual Studio. To select multiple controls, press and hold the SHIFT or CTRL key and click the required controls.

design-time-select-move-multiple-controls

You can select all the controls within a specific area by clicking an empty place on a report’s surface and drawing a rectangle around the required controls.

design-time-select-multiple-controls

Use the handles displayed around selected controls to change their size.

design-time-resize-multiple-controls

You can clone an existing report control by pressing and holding the CTRL key, selecting it using the mouse and moving the mouse to the required location. A cloned control has the same settings as the initial control.

design-time-clone-controls

Reusing Report Elements

You can add selected controls to the Report Gallery and reuse them later in other reports.

report-gallery-add-controls

To add a selected template to a report, drag it from the Report Gallery onto a report’s surface.

report-gallery-apply-controls-template

A template stores various settings related to its controls, such as binding information and appearance options. All these settings are restored after adding controls to a report.

Arranging Report Elements

The following tools allow you to control report elements’ size, location, alignment and to maintain a distance between them:

  • Rulers

    The Report Designer provides horizontal and vertical rulers to help you determine report elements’ size and location.

    design-time-rulers

  • Layout Toolbar

    You can align report controls using the Layout Toolbar commands, similar to aligning other controls in Visual Studio.

    design-time-layout-toolbar

  • Snapping

    A report’s XtraReport.SnappingMode property defines whether automatic report control snapping is enabled and allows you to switch between snapping to a grid and/or snap lines.

    • Snap Grid

      The report’s editing surface displays a visual grid by default, allowing you to determine elements’ size and location in a report. Use the XtraReport.SnapGridSize and XtraReport.SnapGridStepCount properties to customize the grid’s settings.

      design-time-snap-grid

      You can hide the grid by setting the XtraReport.DrawGrid property to false.

      Tip

      To select the measurement units applied to the grid size, use the XtraReport.ReportUnit property.

      Use the context menu to align selected controls to the grid’s cells.

      design-time-align-to-grid

      Relocating a report control using the mouse or the ARROW keys automatically aligns it to the nearest grid cell.

      Tip

      Hold down the ALT when using the mouse and the CTRL when using the keyboard to avoid snapping to the grid when moving or resizing controls.

    • Snap Lines

      The Report Designer displays snap lines by default when moving or resizing report controls, enabling you to align these controls to other report elements.

      design-time-snap-lines

      Tip

      When you move a report control using the ARROW keys or resize it by pressing the SHIFT+ARROW keys, this control is aligned to the nearest report element in that direction using snap lines.

      To maintain a uniform distance between elements in a report, use report elements’ XRControl.SnapLineMargin and XRControl.SnapLinePadding properties.

      Tip

      Hold down the ALT when using the mouse and the CTRL when using the keyboard to avoid snapping controls that are being relocated or resized.

Validating the Report Layout

Your report layout should meet the following requirements to be correctly exported to specific formats:

  • Avoid intersecting controls

    Intersecting controls are highlighted in red by default.

    ShowExportWarnings

    Tip

    To ignore this rule and disable highlighting intersecting controls, set the DesignerOptions.ShowExportWarnings property to false.

  • Avoid placing controls outside page margins

    Controls that do not fit into the printable page area are highlighted in red by default.

    ShowPrintingWarnings

    Tip

    To ignore this rule and disable highlighting intersecting controls, set the DesignerOptions.ShowPrintingWarnings property to false.

See Also