[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.birt] Re: how to make sum of percentile = 100

Alessio,

Can you not just modify the sum expression to round or fixed decimal digits?
ie

xyz = 99.99;
xyz.toFixed(0);

Jason


Alessio Lai wrote:
Hello to all ,
I'm a new Birt user and I'm trying to do a report which display financial analysis with a crosstab and a datacube.


There is a column that shows percentiles of a quantity .
I have created a group whith in the total sum is the sum of the percentiles.
In many cases the total sum is 100 ,
in a few cases , cause the approximation to two decimal digits , the sum is 99.99.
To solve this , I have to add 0.01 to the last percentile row of the group ,


Do you know how can I do that ??
I guess with javascript for example ...
I wonder if there is a function like

data["percentile"].getLastRow().value ,

so I can adjust the last percentile doing this:
data["percentile"].getLastRow().value =data["percentile"].getLastRow().value+0.01



Hope I well explained the problem .

Many thanks ,

Alessio