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

Format Field as Phone Number on report

Status
Not open for further replies.

Jinny

Programmer
Jun 29, 2001
26
US
Using Crystal 8 and AS400 Client Access ODBC.

I have phone numbers stored in my AS400 file that I want
to display as phone numbers on my Crystal Report.

Help Please

Thanks

Jinny
 
What is the data type for the phone numbers (number or text)?
What format are they in now (if you just drop the field on the report and preview)?
What format do you want them in? Malcolm Wynden
Authorized Crystal Engineer
malcolm@wynden.net
 
Thanks for the reply.

Now they are packed 2179352171. I want them to print
217/935-2171. There is a special format in Excel for
Phone Number. It is also possible to create your own format. Does Crystal have such a feature?

 
Have a look at the ToText() function.

Cheers,
- Ido ixm7@psu.edu
 
I used the following to convert my fieldname to a phone number format

Left (CStr(fieldname or variable),3 )&"-"&Right(CStr(fieldname or variable), 4)


fieldname or variable- name of the field from the table or variable that holds the number to format.

Left- takes the first three numbers. must be converted to a string.

Cstr - converts the number to a string.

Right- takes the last four digits of the number which also must be converted to a string.

If you need any further assistance, let me know and I'll do what I can to help. :-V
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top