shellirene
Technical User
I am using Crystal Reports 2013 and Sql Server 2012 and am very new with both.
I am trying to build an address that looks like this
AddLine1 • AddLine2
City • State • Zip
With the bullets removed where there are null values.
This doesn't seem to work at all since the bullets display no matter which field is null.
Can anyone help me figure out what I have done wrong?
Stringvar Uadd2;
Stringvar Uaddcity;
Stringvar Uaddstate;
Stringvar UaddZip;
Stringvar bullet12;
Stringvar bulletCS;
Stringvar bulletSZ;
Uadd1 := If not isnull ({table.FAMUSAddLine1}) then ({table.FAMUSAddLine1}) else "";
Uadd2 := If not isnull ({table.FAMUSAddLine2}) then ({table.FAMUSAddLine2}) else "";
Uaddcity := If not isnull ({table.FAMUSCity}) then ({table.FAMUSCity}) else "";
Uaddstate := If not isnull ({table.FAMUSState}) then ({table.FAMUSState}) else "";
Uaddzip := If not isnull ({table.FAMUSZip}) then ({table.FAMUSZip}) else "";
bullet12 := If not isnull ({table.FAMUSAddLine1}) and not isnull ({table.FAMUSAddLine2}) then " • " else "";
bulletCS := If not isnull ({table.FAMUSCity}) and not isnull ({table.FAMUSState}) then " • " else "";
bulletSZ := If not isnull ({table.FAMUSState}) and not isnull ({table.FAMUSZip}) then " • " else "";
Uadd1 + bullet12 + Uadd2 + ChrW(13)
+ Uaddcity + bulletCS + Uaddstate + bulletSZ + UaddZip;
Thanks Michele
I am trying to build an address that looks like this
AddLine1 • AddLine2
City • State • Zip
With the bullets removed where there are null values.
This doesn't seem to work at all since the bullets display no matter which field is null.
Can anyone help me figure out what I have done wrong?
Stringvar Uadd2;
Stringvar Uaddcity;
Stringvar Uaddstate;
Stringvar UaddZip;
Stringvar bullet12;
Stringvar bulletCS;
Stringvar bulletSZ;
Uadd1 := If not isnull ({table.FAMUSAddLine1}) then ({table.FAMUSAddLine1}) else "";
Uadd2 := If not isnull ({table.FAMUSAddLine2}) then ({table.FAMUSAddLine2}) else "";
Uaddcity := If not isnull ({table.FAMUSCity}) then ({table.FAMUSCity}) else "";
Uaddstate := If not isnull ({table.FAMUSState}) then ({table.FAMUSState}) else "";
Uaddzip := If not isnull ({table.FAMUSZip}) then ({table.FAMUSZip}) else "";
bullet12 := If not isnull ({table.FAMUSAddLine1}) and not isnull ({table.FAMUSAddLine2}) then " • " else "";
bulletCS := If not isnull ({table.FAMUSCity}) and not isnull ({table.FAMUSState}) then " • " else "";
bulletSZ := If not isnull ({table.FAMUSState}) and not isnull ({table.FAMUSZip}) then " • " else "";
Uadd1 + bullet12 + Uadd2 + ChrW(13)
+ Uaddcity + bulletCS + Uaddstate + bulletSZ + UaddZip;
Thanks Michele