Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

 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.

0 votes



One answer

Permanent link
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

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 7,495
× 1,325
× 481
× 360

Question asked: Aug 29 '22, 1:30 a.m.

Question was seen: 1,240 times

Last updated: Aug 29 '22, 7:54 p.m.

Confirmation Cancel Confirm