Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2008-10-23
3
Medium Priority
?
487 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
3 Comments
 
LVL 3

Accepted Solution

by:
bigdaddyz99 earned 200 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

926 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