CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 1999
    Posts
    23

    Crystal reports and Phone #'s



    I can't seem to find any information on displaying a phone number in

    crystal reports in the (###) ### - #### format instead of 1234567891

    when making a report. Can anyone point this out to me?

  2. #2
    Join Date
    May 1999
    Posts
    3

    Re: Crystal reports and Phone #'s

    In crystal reports, create a formula and try the picture function found under "Additional functions"

    Example: Picture ({customer.phone},"(xxx) xxx-xxxx" )

    If the string is 1234567891, then the outcome will be (123) 456-7891. This will work.

    OR

    you can use the Mid function.

    Example: "(" + Mid ({Customer.phone},1 ,3 ) + ") " + Mid ({Customer.phone},4 ,3 ) + "-" + Mid ({Customer.phone},7 ,4 )

    If the string is 1234567891, then the outcome will be (123) 456-7891. This will also work.

    GaryCaspelich

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured