- 2 minutes to read
You can add a table control by dragging the XRTable item from the toolbox DX.20.1.4: Report Controls tab onto the report's area.
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.
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.
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.
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.
Refer to Bind Table Cells to Data to learn about providing dynamic content to table cells.
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.
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).
You can assign different visual styles for even and odd table rows to improve readability.