?
Solved

SQL Server Report Services, Format SSN (Using Visual Studio 2003)

Posted on 2005-03-04
1
Medium Priority
?
1,187 Views
Last Modified: 2012-08-13
I'm trying to do a report with the SQL Server 2000 Report Services extension for Visual Studio 2003.  One column of the report is the peoples' social security number.  The number is stored as a string, but without the two hyphens.  I'd like it to  display using those hyphens.

Originally, the column data was...
=Fields!SSN.Value

I changed it to..
=Format(Fields!SSN.Value,"###-##-####")

When I run the report, all I see is the string ###-##-####.  IOW, no numbers, just pound symbols.

What am I missing?

__Birm
0
Comment
Question by:birmbear
[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
1 Comment
 
LVL 7

Accepted Solution

by:
Lori99 earned 2000 total points
ID: 13460407
The format function is for numeric data.  Since your column is stored as a string or character data, the format function isn't working.  Try converting the value to decimal first like this.

=format(cdec(Fields!SSN.Value),"###-##-####")
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

764 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