← Back to team overview

dhis2-devs team mailing list archive

Re: Handling Decimal Numbers in DHIS2

 

Hi Lars,

Thanks for this. Can this also be applied to the data entry screen and data set reports? If you consider a use case that deals with data ranging from 0 - 1. rounding up or down makes the difference quite significant. 

This would be a very useful function and would like to request extending beyond just the pivot table.

Regards,

Busoye




On 2 Dec 2013, at 11:25, 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
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp


Follow ups

References