Click to See Complete Forum and Search --> : Building a string


bdefreese
December 28th, 2005, 04:26 PM
I am trying to build one field of multiple address lines doing the following:

Local StringVar F_ADDRESS_STRING := {CUSTOMER_ADDRESSES.SYS_ADDRESS_1};

If Len({CUSTOMER_ADDRESSES.SYS_ADDRESS_2}) > 1 Then
F_ADDRESS_STRING:= F_ADDRESS_STRING + Chr(13) + {CUSTOMER_ADDRESSES.SYS_ADDRESS_2};

If Len({CUSTOMER_ADDRESSES.SYS_ADDRESS_3}) > 1 Then
F_ADDRESS_STRING:= F_ADDRESS_STRING + Chr(13) + {CUSTOMER_ADDRESSES.SYS_ADDRESS_3};

If Len({CUSTOMER_ADDRESSES.SYS_ADDRESS_4}) > 1 Then
F_ADDRESS_STRING:= F_ADDRESS_STRING + Chr(13) + {CUSTOMER_ADDRESSES.SYS_ADDRESS_4};


F_ADDRESS_STRING

I keep getting nothing back. Any ideas? Or is there a better way to do this? I can suppress the print of Address_2-4 but they don't move up so I end up with whitespace on the address label.

Thanks a million!

Barry