Jump to content

social security number pattern question

Go to solution Solved by jmoore2416,

Recommended Posts

Using Jaspersoft Studio 6.20.6, I am formatting an integer field containing social security number with the following pattern:


The social security number to output is 999999999.  I am expecting formatted output to be 999-99-9999.  The report output comes as 999999999--.

Why does this not work?  



Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Solution

Created a variable sssno to convert the integer to string and used this - 

$V{sssno}.substring( 0, 3) +"-" + $V{sssno}.substring( 3, 5) + "-" + $V{sssno}.substring( 5, 9)

Kinda ugly but solves the problem.  moving on.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...