Monday, October 26, 2009

Inserting a Line Break in ColdFusion Report Builder

I had a field that I wanted to insert a line break. This field needed to be dynamic in it's sizing and it is very possible that it will have to wrap. So It was not an option to just place another field box or textbox below the current one, because if it wrapped and expanded, then the text would flow over the box below.

So I needed a way to force a line break inside the expression builder.

Turns out I just needed to insert a "Chr(10)". More detail: query.fieldname & Chr(10) & ' more text here if you want'

That worked great and now the size of the text in query.fieldname doesn't matter. If it wraps everything is just pushed down, as I wanted.

No comments: