Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Zip Codes and extensions...
Message
 
To
04/09/1998 17:20:46
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00133487
Message ID:
00133498
Views:
12
>Hello all...
> I have a report that shows zip codes along with other information. Sometimes the zips have an extension (12345-6789) and sometimes they do not (12345). The zips that do not have an extension are showing up like this: 1-2345
> I have an input mask of 99999-9999 and used the val() function to display.
>
>Ideas are appreciated.
>
>Jason Nance

Jason,

Why are you using the VAL() function, it will strip off leading zeros which will cause many zip codes to print incorrectly. Add a field to your report and make the expression;

TRANSFORM(ZipField,IIF(LEN(TRIM(ZipField))> 5,"99999-9999","99999"))
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform