← Back to team overview

dhis2-devs team mailing list archive

Re: Handling Decimal Numbers in DHIS2

 

Hi Lars,
this sound excellent. If we can control the number of decimal points to be displayed as you described here. We will go for zero decimal places or two decimal places.

Lungo



On Monday, December 2, 2013 2:25 PM, Lars Helge Øverland <larshelge@xxxxxxxxx> wrote:
 
Okay Lungo, I understand. The issue is that in most cases, 1 decimal is appropriate. Then, some people want no decimals and some want no rounding at all.

I assume your use-case is that you save a pivot table (report table) as a favorite, then use it as source for a financial standard report designed in ireport.

I propose this: We introduce a new option in pivot table module (and in analytics api) called "Skip rounding of values". When ticket, we do not round off the values at all, providing full precision for values (we are using double as value type in the api). Then, you can select this option for your table and leave it to ireport to round off to the appropriate number of decimals (use the number format). How does that sound to you?

Lars
 



On Sun, Dec 1, 2013 at 8:36 PM, Juma Lungo <jlungo@xxxxxxxxx> wrote:

Dear Lars
>
>
>Since we are using the DHIS2 to compute financial figures, we need to display the values either in two decimal places or zero decimal places. Not one decimal places. Now, if we format our iReports to zero decimal places, when a user enters say 6.47, the database will convert it into 6.5 and iReport will convert it to 7. Thus, a user enters 6.47, instead of getting 6 she end up getting 7. It is a big challenge for us.
>
>
>Lungo
>
>
>
>On Sunday, December 1, 2013 9:28 PM, Lars Helge Øverland <larshelge@xxxxxxxxx> wrote:
> 
>For a pivot table example see here:
>
>
>http://apps.dhis2.org/demo/api/reportTables/KmJwftqlU86/data.html
>
>
>
>
>
>
>
>

Follow ups

References