Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula result question 2

Status
Not open for further replies.

Crystalfire

Programmer
Jan 29, 2002
315
0
0
US
I have a simple formula
{QUOTE.CITY}+" "+{QUOTE.STATE}+" "+{QUOTE.ZIPCODE}
which sometimes works fine and other time does not bring over any info when there should be. If I use the fields by themselves then the info comes over. Any ideas would be apprieciated.
Using Crystal 8.5
 
You may have a null value in one of your fields. Try it by convertion null values to default values using Reporting Option
 
Try:

whileprintingrecords;
stringvar MyCityStZip:="";
if not(isnull({QUOTE.CITY})) then
MyCityStZip:={QUOTE.CITY} & " ";
if not(isnull({QUOTE.STATE})) then
MyCityStZip:=MyCityStZip & {QUOTE.STATE} & " ";
if not(isnull({QUOTE.ZIP})) then
MyCityStZip:=MyCityStZip & {QUOTE.ZIP};
MyCityStZip

Or you can turn on the File->Report Options->Convert null values to default and it will handle it for you.

-k
 
Or just place the 3 fields into a Text Object with a space between the fields.


Bob Suruncle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top