tt_linux Posted July 18, 2006 Share Posted July 18, 2006 hi, i need to suppress leading zeroes in my ireport field (type: string)eg., "0004" should be "4". someone gave me some help in this forum (sourceforge) the code is given below .. but did not compile correctly. Can some kind soul help me with the syntax and whether this will work ... new integer().valueOf($F{fieldname}) P.S.: the database field is in string. i have changed the ireport field to "java.lang.integer" Thanks .. Tony Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted July 18, 2006 Share Posted July 18, 2006 Use this expression: Integer.valueOf( $F{fieldname}) Giulio Link to comment Share on other sites More sharing options...
Duggu09 Posted March 8, 2018 Share Posted March 8, 2018 Hi,Use this in your Sql QueryLtrim(fieldName, '0') as NewFieldnameDirectly use 'NewFieldName' in Jasper. 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