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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Canadian Postal Code & Phone number 1

Status
Not open for further replies.

8track

Technical User
Aug 6, 2004
9
CA
Hi,

I am extracting data from an Access database into a CR v.8 report. The data field in Access is currently formatted with a Canadian Postal code as follows T5T_2N2. My question is as follows: The postal code shows in the CR report as T5T2N2 (there should be a space with no underscore) How do I include a space yet not the underscore?

Second question is regarding a 7-digit phone number. The dash does not appear and the phone numbers are reported as 4818175. All appears correctly within the Access database, but when pulled into Crystal, it goes wonky.

Any help out there?

Thanks
 
Looks like there are Edit Masks on both of those fields within the Access DB. Try this for the Postal Code:

Left({Table.PostalCode}, 3) + " " + Right(Trim({Table.PostalCode}), 3)

For the phone number, you should have the Picture function in CR 8:

Picture({Table.Phone}, "xxx-xxxx")

-dave
 
Thanks. It worked perfectly. Things are starting to come back to me again as I use CR again after a 3 yr absence.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top