Portlight Posted August 23, 2011 Share Posted August 23, 2011 I am trying to format the phone number passed to the reportvariable is passed as a string in the pattern box i have TELEPHONE pattern: <textField pattern="(###)###-####" isBlankWhenNull="true">However this DOES NOT change the format of the field - the numbrs print out 12345614789 as opposed to (123)456-4789Any ideas on how to alter this outcome Link to comment Share on other sites More sharing options...
Portlight Posted August 23, 2011 Author Share Posted August 23, 2011 (phone != null && phone.length() == 10) ? "(" + phone.substring(0,3) + ")" + phone.substring(3,6) + "-" + phone.substring(6,10) : phone in text expression field 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