Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
I would like to be able to do sum of a column content with iReport.
Here is my JRXML :
And here is my report where i would like to replace "null" values by sum of values above it :
is there somebody who know's how to do it ? Please.
Thanks.
for those that will be interessed ...
I created a variable that i named "SOUS_TOTAL" for calculate the value "Total du bon" (as show in picture above with value "null") and whose the field is a Float type.
I set this variable property like that :
Variable Class : java.lang.Float
Calculation : Sum
Reset type : Group
Reset group : Groupe2
Increment type : None
Variable Expression : $F{MONTANT_HT}
In the properties of the "SOUS_TOTAL" field of the previously created variable, I define the type as Float too.
For the top field ($F{Montant_HT}) in Detail band, i set it as a Float too (for the propertys of field and variable).
Now, my problem is that i dont catch the decimal after coma, while i see it if the fields type is String.
If somebody have an idea ...
I found how to do what i need. I couldn't displayed the decimals because of point, it wasn't be treating correctly in Jasper iReport. i replaced it by comma in a tMap component and all worked perfectly.
All is solved.
If that can help somebody ...