nhutnhut79 Posted October 28, 2013 Share Posted October 28, 2013 Hi,I use Math.round() to two decimal but somewhere not true.Please help me!I am using Ireport v5.0Thank!nhutnhut79@yahoo.com Link to comment Share on other sites More sharing options...
sanbez Posted October 29, 2013 Share Posted October 29, 2013 Try to use BigDecimal.setScale instead Math.roundFor example as here: public static double round(double value, int decimalPlace) { return new BigDecimal(value).setScale(decimalPlace, BigDecimal.ROUND_HALF_UP).doubleValue(); }May be it solve your problem.Welcome to the world of java-computing :)) Link to comment Share on other sites More sharing options...
nhutnhut79 Posted October 29, 2013 Author Share Posted October 29, 2013 Great, Thank you very much. sanbez! Link to comment Share on other sites More sharing options...
gowthamsenmca Posted December 4, 2014 Share Posted December 4, 2014 Hi,Can you please share your experience in migrating from cyrstal to Jasper. I am in the similar situation.Best RegardsGowtham 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