Solved

What is the code structure to format a numeric value as a phone number in a rdlc

Posted on 2008-10-23
3
465 Views
Last Modified: 2013-11-26
I am trying to format a numeric value retrieved from an data table, so that it will display as a phone number in a rdlc. I am using the microsoft report viewer and creating the rdlc using the drag method from the available fields in the data table.
rdlc-screen-view.bmp
0
Comment
Question by:gregoronovich
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Accepted Solution

by:
bigdaddyz99 earned 50 total points
ID: 22809634
I use something similar to this from
http://www.themssforum.com/SVCS/format-phone/
= Format(Convert.ToDouble("90155585850000"), "(###) ###-#### 'Ext.' ####") 
 
'or use a regular expression, sth like 
 
=System.Text.RegularExpressions.Regex.Replace(Fields!phone.Value, 
"(\d{3})(\d{3})(\d{4})", "($1) $2-$3") 

Open in new window

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question