Using the Can Grow property

Some of the controls in the ForNAV Designer have a property named Can Grow. This feature can make controls change size to match the content. It is commonly used with the Text Box and Address controls where you normally don’t know the exact size of the content.

There are a few tricks you need to know to get the best results when using this feature.

The first thing that you have to know is that the control will grow in height, depending on how much space is available in the section where it is located. The growth in height and the location of the control is based on the Text Alignment property of the control. In most use cases, you should select Top Left for the Text Alignment property. This will most likely give you the result you are expecting.

A text box will grow in width to match the longest line in the content and it will grow in height to fit all lines or until it grows out of the section.

If you want to lock the width of a text box and only grow it in the vertical direction, then you must create a table and set the Can Grow property of the Cell, Row, and Table to yes. There is a trick to navigate from the Cell to the Row and Table: when you click a Cell, you can get the Row properties by pressing the Escape key. This technique will also take you from the Row to the Table properties. Alternatively, you can use the Report Explorer window to navigate between the elements.

You also have the possibility to make the section grow. When using this feature, the growing controls are not limited by the section height. The section itself will grow to fit the growing controls. Please note that only Body sections can grow.

The following shows a simple example of how to make the controls grow:

All the shown controls have a source expression with lines of numbers.

The controls on the left and in the middle are text boxes, and the one on the right is a table with a row and a cell. All the Can Grow properties are set to Yes.

The Text Alignment property is set to Top Left.

When the report is previewed, you can see that the text box grows in height and width whereas the table cell only grows is height.