jkeri Posted January 16, 2019 Share Posted January 16, 2019 I my SQL query I have two numeric fields $F{F1} and $F{F2} . Each is defined as java.math.BigDecimalF1 value is 120.3415699F2 value is 178.00987What i what to do is to print the two fields concatenated together and | seperated with 3 decimal positions each. This is what I want to be printed:120.341|178.009What is the coding for the EXPRESSION to achieve this? Link to comment Share on other sites More sharing options...
akovach Posted January 17, 2019 Share Posted January 17, 2019 Hi,The following might help you:CONCATENATE (new BigDecimal($F{F1}).setScale(3, BigDecimal.ROUND_CEILING), "/", new BigDecimal($F{F2}).setScale(3, BigDecimal.ROUND_CEILING))Here is the link to Rounding of BigDecimal:https://community.jaspersoft.com/wiki/how-round-bigdecimal-value 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