Remove Blank Lines

Stimulsoft Reports.NET discussion
Post Reply
focus_nz
Posts: 4
Joined: Wed Sep 12, 2007 11:34 pm
Location: New Zealand

Remove Blank Lines

Post 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.
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Remove Blank Lines

Post 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.
focus_nz
Posts: 4
Joined: Wed Sep 12, 2007 11:34 pm
Location: New Zealand

Remove Blank Lines

Post by focus_nz »

Thanks, that was what I was after.
Post Reply