I am working on a customer invoice report that needs to print out the billing and shipping address as part of the report. Each address contains 8 fields: Name, Attention, Address1, Address2, City, State, Zip, & Country.
I am pulling each field from the database. Most of the time the Attention and Address2 fields are blank. Is there a nice way to display these addresses without leaving a blank line when the fields are empty? Here's an example of what I'm getting:
BILL TO: Joe Mama (Name)
(Attention)
1558 N American Way (Address1)
(Address2)
Payson, CA 86214 USA
If the Attention field is blank I would like it to show as:
BILL TO: Joe Mama
1558 N American Way
Payson, CA 86214 USA
Thanks for the help.
I am pulling each field from the database. Most of the time the Attention and Address2 fields are blank. Is there a nice way to display these addresses without leaving a blank line when the fields are empty? Here's an example of what I'm getting:
BILL TO: Joe Mama (Name)
(Attention)
1558 N American Way (Address1)
(Address2)
Payson, CA 86214 USA
If the Attention field is blank I would like it to show as:
BILL TO: Joe Mama
1558 N American Way
Payson, CA 86214 USA
Thanks for the help.