Skip to Content
0
Former Member
Sep 11, 2007 at 11:45 PM

Formatting address data

192 Views

Post Author: tmwa01

CA Forum: General

I am trying to get the address on one line in Crystal Report 11. The output should look like

1234 N Street Dr - Goodcity

I am trying the following syntax but output gives as 1,234 N Street Dr - Goodcity. Also if any one of field is having blank data (suppose TEST.ADR_TY is blank) then it gives a blank line. How do we get without the comma and also if data is missing, then the rest of the data is populated instead of the blank. Appreciate any input on this syntax.

{TEST.ADR_BDG} & ' ' & {TEST.ADR_DIR} & ' ' & {TEST.ADR_STR} & ' ' & {TEST.ADR_TY} & ' - ' & {TEST.CITY}

Also if I have the address in 4 lines like

Name

address1

address2

city, state zip

if address 2 is blank, then how do we get address2 line gets suppressed, and city, state zip move up close to address1. For example if we have the address as follows:

Anonymous

1234 N Street Dr

PO BOX 1234

Goodcity, GoodState 99999

and if we do not have PO BOX 1234, then the address should look like

Anonymous

1234 N Street Dr

Goodcity, GoodState 99999

without the blank line. Thanks for your help.