cbarlow3 Posted February 27, 2013 Share Posted February 27, 2013 I usually handle this directly in the SQL rather than in the presentation part of a report. For example, maybe I've just calculated an average loan balance by dividing some total money amount by an integer, resulting in an answer that has significant digits beyond the "pennies" column, but I want to round my answer to the nearest two decimal places. I would typically not do any rounding on any intermediate results, but once I'm ready to create the final result for display purposes, it can be done like this:CAST(AVG_LOAN_BALANCE + 0.005 AS DECIMAL(16,2)) AS AVGBALI'm sure you can also do it purely at the display level by changing the Java/Javascript/Groovy that controls the Text Field Expression. I don't think you can do it by just using one of the standard numeric patterns and specifying two places after the decimal, since the pattern alone will truncate rather than round. Link to comment Share on other sites More sharing options...
markee_pascual Posted February 28, 2013 Author Share Posted February 28, 2013 Thanks a lot sir. 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