It's all about the answers!

Ask a question

How to fetch decimal values of the calculation done in JRS report


Alfred Miranda (43415) | asked Aug 29 '22, 1:30 a.m.

 Hello All,


I am creating a report where i am doing a mathematical calculation in advanced query of a JRS (DW ) report. I have tried using Decimal(value,4), float to get the decimal value result of the calculation done. But I am unable to get the decimal values (i.e., it is showing 3.00 instead of showing 3.42 ). Or is it a known issue in JRS?


Help on this query is very much appreciated.

One answer



permanent link
Davyd Norris (2.8k217) | answered Aug 29 '22, 7:54 p.m.
From my experience, the floating point data type in DNG is quite low precision (although not as low as you seem to have in your question!). In several cases I ended up using a String and then converting it to a float value.

Either way, the floating point arithmetic, what functions are available, and their precision is  a function of the back end database you're using.

If this is a DB2 back end database then the DECIMAL function is actually used to convert data into a fixed point value and it takes three arguments - DECIMAL(value, <precision, <scale>), where precision is the total number of digits in the result, and scale is the number of decimal places, so your function should really be DECIMAL(value, 3, 2) - leaving out the last parameter sets it to zero, so you get 3 digits and no decimal places

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.