jakehngo Posted September 13, 2017 Share Posted September 13, 2017 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 birthmember ID: 123456 DOB: 6/7/2011final result: 123456J07here 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/yyyyI 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now