Jump to content
Changes to the Jaspersoft community edition download ×

Ireport formatting help for beginner


jakehngo

Recommended Posts

I have member IDs and their date of births so I need to generate this final structure:   member ID + First Capital letter of birth month +2 digit day of birth

member ID: 123456 

DOB: 6/7/2011

final result:   123456J07

here are the fields in my Ireport: 

member ID: $F{localId}           Expression Class:  (java.lang.String)

DOB: $F{person}.getDob()        Expression Class:(java.lang.string)   Patttern: MM/dd/yyyy

I am having issues with the cast to string error so can anyone help create the right code? here is my code below:

CONCATENATE($F{localId},LEFT(new SimpleDateFormat("MM", Locale.ENGLISH).format($F{person}.getDob())),new SimpleDateFormat("dd").format($F{person}.getDob()))

Thanks for any help.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...