I'm mail-merging an address list from an Excel spreadsheet into a letter in Crystal. In the spreadsheet, the Zip Code is formatted with the special Postal Code formatting that displays leading zeros (eg: 04512 instead of 4512). When I view the field in the Crystal letter, the zip code displays as 4,512.00. If I apply formatting to remove the comma and zeros, I get 4512.
So I tried to explicitly convert it with a formula:
if Len(CStr({MailList.Zip})) = 4
then "0" & CStr({MailList.Zip})
else CStr({MailList.Zip});
But I found that in order to accomplish this, I needed to convert the zip code to a string. This formula still results in a display of 4,512.00.
The strange thing is that I've run this letter every week for the last 3 months and have not encountered this problem until now. The source data has not changed. The only change has been my operating system. We upgraded to XP on Friday. Though I'm not sure how this would affect how Crystal formats numbers.
So I tried to explicitly convert it with a formula:
if Len(CStr({MailList.Zip})) = 4
then "0" & CStr({MailList.Zip})
else CStr({MailList.Zip});
But I found that in order to accomplish this, I needed to convert the zip code to a string. This formula still results in a display of 4,512.00.
The strange thing is that I've run this letter every week for the last 3 months and have not encountered this problem until now. The source data has not changed. The only change has been my operating system. We upgraded to XP on Friday. Though I'm not sure how this would affect how Crystal formats numbers.