Page 1 of 1

Remove Blank Lines

Posted: Tue Sep 25, 2007 4:36 pm
by focus_nz
I am wanting to remove blank lines from a text field.

I have the expression set to:

Code: Select all

{PurchaseOrder.Comp_Name}
{PurchaseOrder.Addr_Address1}
{PurchaseOrder.Addr_Address2}
{PurchaseOrder.Addr_Address3}
If {PurchaseOrder.Addr_Address2} contains a null or empty string I don't want there to be a blank line between {PurchaseOrder.Addr_Address1} and {PurchaseOrder.Addr_Address3}.

So instead of it displaying the data like this (if there is nothing for the Address2 field):

Code: Select all

My Company Name
My Address 1 Text

My Address 3 Text
I want it to look like...

Code: Select all

My Company Name
My Address 1 Text
My Address 3 Text
Any ideas on how I can achieve this?

Thanks.

Remove Blank Lines

Posted: Tue Sep 25, 2007 5:58 pm
by Brendan
One trick is to use a Container and 4 text components
You can set the Can Grow and Can Shrink properties to true for the Container

Add 4 Text Components inside the Container setting Can Grow and Can Shrink to true.
Also set the Dock Property to Top for each text component.

You can set the Expression of each text component to your address line.

Remove Blank Lines

Posted: Wed Sep 26, 2007 3:53 pm
by focus_nz
Thanks, that was what I was after.