• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1270
  • Last Modified:

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

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
birmbear
Asked:
birmbear
1 Solution
 
Lori99Commented:
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now