The requested page is not available for the requested platform. You are viewing the content for Default platform.

Table Overview

The XRTable control displays information in a tabular format and allows you to create table reports.

You can add a table control by dragging the XRTable item from the toolbox DX.18.2: Report Controls tab onto the report's area.

table-control-drag-from-toolbox

You can also create two tables simultaneously, for instance, one that shows column titles in the Page Header and one that shows regular information in the Detail band. Select the XRTable item in the Toolbox and draw a rectangle across these bands.

table-control-add-to-multiple-bands

The XRTable control contains one or more rows (XRTableRow objects) stored in the XRTable.Rows collection. Each row contains one or more cells (XRTableCell objects) that you can access using the XRTableRow.Cells property. See the Report Explorer for a table structure example.

table-control-in-report-explorer

Use the XRControl.Text property to specify the cell's static text. You can double-click the cell to invoke its in-place editor and type the desired text.

table-control-cell-static-text

You can adjust the font size of a cell's static text to fit into the cell's boundaries by right-clicking this cell and selecting Fit Text to Bounds in the context menu.

table-control-cell-fit-text-to-bounds

Refer to Bind Table Cells to Data to learn about providing dynamic content to table cells.

A table cell is like an XRLabel control - it provides the same options for text formatting, alignment, appearance, interactivity, etc. See the Label topic to learn how to specify these options.

You can also make a table cell act as a container for other report controls by dropping the required control from the toolbox on this cell.

table-control-cell-drop-other-control

If a table cell includes only one control, you can right-click this control and use the Fit Bounds to Container command in the context menu. This command resizes the control so that it occupies all the available cell space (excluding borders).

To transform a table into a set of XRLabel controls, right-click a table or any of its cells and select Convert To Labels. Table cells containing other controls are converted to XRPanel controls.

xrtable-convert-to-labels

You can assign different visual styles for even and odd table rows to improve readability.