keith.crown Posted September 16, 2020 Share Posted September 16, 2020 How in Jaspersoft Server can I change 12.34 to 00000012.34 please? Link to comment Share on other sites More sharing options...
A3an Posted September 16, 2020 Share Posted September 16, 2020 What's the data type of 12.34? String ? float? Link to comment Share on other sites More sharing options...
jgust Posted September 18, 2020 Share Posted September 18, 2020 You can convert the number to a string and prefix with your zeros."00000" + $F{MyFloat}.toString() [/code] Link to comment Share on other sites More sharing options...
andrew_50 Posted September 21, 2020 Share Posted September 21, 2020 JasperSoft Studio has the TEXT function which you can use in the "Text Field" like this...TEXT($F{QR},"000000")Here the field QR is an integer, and the TEXT function converts it to a value with the "right number" of leading zeroes.For example, if QR = 1037, then you'd get 001037 from the function.HOWEVER...If it's floating point you need, then the other answer works.ALSOOn the Text Field property, there's an entry called "Pattern"There you can pretty much play with formats kind of like in Excel. 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