Controlling Line Breaks in Variable Length Expression
Posted: 16 Jan 2026, 13:54
(Report Designer v7.0.72.0)
My company sells products with radically varying amounts of invoicing information - sometimes just a name, sometimes a name, part number, HS tariff code, country of origin, batch code, supplier conformity certification code, trace code etc.
To cut down on white space, I've used an expression to concatenate whichever fields are populated and put it in an auto-growing box in my report. This works reasonably well, but the strings themselves also vary in length considerably, so if I give them each a newline it often wastes a lot of space. I prefer to seperate them with "|"s on one line and allow it to wrap, but this then can introduce line breaks in the middle of a field ( "Turnip | Carrot | Sweet
Potato" ).
I'd like automatic line breaks, but only inbetween fields, not within them. Of course, Unicode gave us the non breaking space for this reason, and reports will accept them and interpret them correctly, but maddeningly, they'll be replaced with placeholder "?"s when you actually export the document as a PDF for email.
I suppose I could track a running total of character length and insert line breaks when the total would otherwise break into a new line, but that potential rats' nest of nested IF() functions seems pretty unwieldy.
Is there any other way to supress line breaks within certain sections of an expression?
My company sells products with radically varying amounts of invoicing information - sometimes just a name, sometimes a name, part number, HS tariff code, country of origin, batch code, supplier conformity certification code, trace code etc.
To cut down on white space, I've used an expression to concatenate whichever fields are populated and put it in an auto-growing box in my report. This works reasonably well, but the strings themselves also vary in length considerably, so if I give them each a newline it often wastes a lot of space. I prefer to seperate them with "|"s on one line and allow it to wrap, but this then can introduce line breaks in the middle of a field ( "Turnip | Carrot | Sweet
Potato" ).
I'd like automatic line breaks, but only inbetween fields, not within them. Of course, Unicode gave us the non breaking space for this reason, and reports will accept them and interpret them correctly, but maddeningly, they'll be replaced with placeholder "?"s when you actually export the document as a PDF for email.
I suppose I could track a running total of character length and insert line breaks when the total would otherwise break into a new line, but that potential rats' nest of nested IF() functions seems pretty unwieldy.
Is there any other way to supress line breaks within certain sections of an expression?