mco32
asked on
If statements in Crystal Reports
Hi
Can someone help with the formula below. I am trying to get the address to show in one text box. If all fields have data, all show in the text box on the report but if one is blank then from the blank field on does not display (eg. if add3 = "" then nothing else will show on the report after add2, but if its present all data shows.
Please help,
CSTR({Customer.customer_Ad d1}) &
IF CSTR({Customer.customer_Ad d2})="" THEN "" ELSE CHR(13) & CSTR({Customer.customer_Ad d2}) &
IF CSTR({Customer.customer_Ad d3}) ="" THEN "" ELSE CHR(13) & CSTR({Customer.customer_Ad d3}) &
IF CSTR({Customer.customer_To wn}) ="" THEN "" ELSE CHR(13) & CSTR({Customer.customer_To wn}) &
IF CSTR({Areas.area_Name}) ="" THEN "" ELSE CHR(13) & CSTR({Areas.area_Name}) &
IF CSTR({Customer.customer_Po stcode}) ="" then "" ELSE CHR(13) & CSTR({Customer.customer_Po stcode})
Can someone help with the formula below. I am trying to get the address to show in one text box. If all fields have data, all show in the text box on the report but if one is blank then from the blank field on does not display (eg. if add3 = "" then nothing else will show on the report after add2, but if its present all data shows.
Please help,
CSTR({Customer.customer_Ad
IF CSTR({Customer.customer_Ad
IF CSTR({Customer.customer_Ad
IF CSTR({Customer.customer_To
IF CSTR({Areas.area_Name}) ="" THEN "" ELSE CHR(13) & CSTR({Areas.area_Name}) &
IF CSTR({Customer.customer_Po
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Good catch. That is the problem with not being able to run the code.
mlmcc
mlmcc
ASKER
Thank you again - never would have got this without you
ASKER
Thank you so much
Local StringVar outString;
outString := CSTR({Customer.customer_Ad
IF CSTR({Customer.customer_Ad
outString := outString & CHR(13) & CSTR({Customer.customer_Ad
IF CSTR({Customer.customer_Ad
outString := outString & CHR(13) & CSTR({Customer.customer_Ad
IF CSTR({Customer.customer_To
outString := outString & CHR(13) & CSTR({Customer.customer_To
IF CSTR({Areas.area_Name}) <> "" THEN
outString := outString & CHR(13) & CSTR({Areas.area_Name}) ;
IF CSTR({Customer.customer_Po
outString := outString & CHR(13) & CSTR({Customer.customer_Po
outString