Skip to content
English
  • There are no suggestions because the search field is empty.

Replacing a Static Table with a DevExpress Table

How to replace a static table with a DevExpress table

When designing reports in FormsPro, a static table made up of individual controls may not expand correctly when the content varies in length. For example, if one cell contains more text than the others, the text may wrap or expand without the other cells in the same row adjusting to the same height. This can cause the table borders and cell alignment to become uneven.

Replacing the static table with an actual DevExpress table can help resolve this issue. A table organizes content into rows and columns, allowing the cells within a row to share a common structure. When a cell needs additional height to accommodate its content, the row can expand to fit, helping maintain alignment with the other cells.

This article explains how to recreate an existing static table using a DevExpress table control.

1. Add a Table control to the report.

  • Open the Report Designer for the report you want to modify.
  • Drag (Table) onto the report where you want the existing table to appear.
  • Resize the new table to approximately match the width of your existing static table.

2. Configure the rows and columns.

Adjust the structure of the new table to match your existing static table.

  • Add or remove rows to match the existing layout.
  • Add or remove columns as needed.
  • Adjust the column widths to match the proportions of your existing table.

You can right-click a table cell to insert or delete rows and columns.

3. Move the content into the new table.

Recreate the contents of your existing static table in the corresponding cells of the new table.

We recommend working one cell at a time rather than attempting to move the entire static table at once.

For each cell:

  • Select the cell in the existing static table.
  • Copy the text, data field, or expression contained in the cell.
  • Select the corresponding cell in the new table.
  • Recreate the content and apply the necessary formatting.

Repeat these steps until all cells have been recreated.

Using the following example, click on the tableCell4 cell to open the Expression Editor. Click Fields, select the form answer you want to display in the cell, and apply it to the expression. This will populate the table cell with the selected form answer.

The information from the original static table cell is now in the new table.

If your existing static table contains individual labels, you may need to copy the text into the new table cells rather than attempting to drag the labels into the table.

4. Configure the cell properties.

For each cell in the table mark Can Grow, Multiline and Word Wrap.

These settings allow text to wrap onto multiple lines and the cell to grow vertically as needed.

You may also need to adjust the following properties to match your existing table:

  • Text Alignment: Adjust the horizontal and vertical alignment of the text within the cell.
  • Borders: Configure the cell borders to match the existing layout.
  • Column Width: Adjust the column widths to accommodate the content and maintain the existing layout.

5. Preview and verify the report.

Before removing the original static table, preview the report and verify that the new table displays as expected. As shown in the following illustration, the DevExpress Table automatically expands to accommodate the additional text, allowing the row height to adjust and keeping the cells aligned:

Confirm the following:

  • Text is not cut off.
  • Longer text wraps onto multiple lines.
  • Cells expand vertically when the content requires additional space.
  • Other cells in the same row expand to maintain alignment.
  • Borders remain aligned across the row.
  • Column widths and text formatting match the existing layout.

If the cells are not expanding as expected, review the cell properties and confirm that Can Grow, Multiline, and Word Wrap are enabled.

6. Remove the original static table.

Once you have confirmed that the new table displays correctly:

  • Return to the Report Designer.
  • Finish recreating the contents of the original static table in the new table, including any labels, text, and data fields.
  • Remove the original static table and its associated controls.
  • Preview the report again to confirm that the new table displays correctly without the original controls.

We recommend keeping the original static table in place until you have verified that the new table is working as expected. This allows you to compare the two layouts and helps prevent losing the original content or formatting before the replacement is complete.

The Report Designer uses DevExpress tools to create reports. For more information about DevExpress report controls and functionality, see DevExpress Documentation.