This example calculates the column width to display the entire cell content and adjusts the width of the table column in the resulting document.
The code in this example does the following:
- Calls the XtraReport.CreateDocument method to create a report document. A document is a collection of document bricks.
- Iterates through the brick collection to find the maximum text width per column. The BrickSelector class instance loops through visual bricks, and the BestSizeEstimator class methods are used to calculate the text width.
- Specifies the XRTableCell.WidthF property.
- Re-creates the report document with the new column width.
- Form1.cs (VB: Form1.vb)
- Program.cs (VB: Program.vb)
- XtraReport1.cs (VB: XtraReport1.vb)
- ReportHelper.cs (VB: ReportHelper.vb)