detheo Posted May 3, 2011 Share Posted May 3, 2011 Hi, Being rather new on Ireport I've got a problem outlining on a decimal position.It's a quantity with type double precision and the pattern ##0.##. Is it possible to outline on the zero of the pattern, so that with for example 113.15 and 53 both 3 are exactly beneath each other? Thanks in advanceTheo Link to comment Share on other sites More sharing options...
kolaitis Posted May 3, 2011 Share Posted May 3, 2011 Suggestion :Create variable i.e: D1 , VariableClassType : java.lang.String , VariableExpression : {yourDoubleValueField}.toString()Create text Field in your Detail Band with expression :$V{D1}.endsWith( ".0" ) ? $V{D1}.replace( ".0", " " ) :new DecimalFormat("#,##0.##;- #,##0.##").format( {yourDoubleValueField} ) Good Luck. Link to comment Share on other sites More sharing options...
detheo Posted May 3, 2011 Author Share Posted May 3, 2011 Thanks, it's very helpfull 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