Hi,
I am using Crystal Reports Version 11 and I am trying to print the customer address using the following formula;
stringVar address := "";
if (not(isnull({OEHDR.Custaddr1})) and {OEHDR.Custaddr1} <> "")
then address := {OEHDR.Custaddr1} + " " + chrw(13);
if (not(isnull({OEHDR.Custaddr2})) and {OEHDR.Custaddr2} <> "")
then address := {OEHDR.Custaddr2} + " " + chrw(13);
if (not(isnull({OEHDR.Custcity})) and {OEHDR.Custcity} <> "")
then address := address + {OEHDR.Custcity} + " ";
if (not(isnull({OEHDR.Custstate})) and {OEHDR.Custstate} <> "")
then address := address + {OEHDR.Custstate} + " ";
if (not(isnull({OEHDR.Custzip})) and {OEHDR.Custzip} <> "")
then address := address + {OEHDR.Custzip} + " ";
if (not(isnull({OEHDR.Custcntry})) and {OEHDR.Custcntry} <> "")
then address := address + {OEHDR.Custcntry};
address
My problem is when Custaddr1 and Custaddr2 are populated only Custaddrs 2 is showing, do you see anythink wrong with the formula?
Thanks