How To…Format Text With Ellipse

Question

“How can I append a ‘…’ to the end of text that is too wide to fit the bounds of a control?”

Solution

ReportBuilder 12 introduced the TppCustomText.Ellipsis property to automatically truncate text too wide to fit in a given area.  Below is an example of performing this task for versions earlier than RB 12.

The following example shows how to calculate the width of text and truncate it with a ‘…’ when the text is too wide to fit.

Download: FormatTextWithEllipse.zip