Quantcast
Channel: SQL Server Reporting Services, Power View 포럼
Viewing all articles
Browse latest Browse all 24955

Phone number expression help

$
0
0

I've written the following expression to format the phone number. 

IIF(First(Fields!PHONE1.Value, "DataSet1") Is Nothing, 
  Nothing, 
  IIF(IsNumeric(First(Fields!PHONE1.Value, "DataSet1")), 
    Format(Val(First(Fields!PHONE1.Value, "DataSet1")), "(###)###-####"), 
    First(Fields!PHONE1.Value, "DataSet1")))

The issue is that when it pulls in I've got 4 zeroes (I think from the extension) that is throwing it off. How do I get rid of these zeroes?

This is a sample of what I get: (5213229)290-0000


ipainter


Viewing all articles
Browse latest Browse all 24955

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>