Hi,
I have a query that returns something like:
Help Year num
1 1 12
2 1 35
3 1 46
4 1 3
1 2 23
2 2 67
3 2 39
4 2 17
1 3 37
2 3 65
3 3 11
4 3 54
I want to make a chart showing:
num_help1_year1/sum(num_year1), num_help2_year1/sum(num_year1), ...
...
num_help1_year4/sum(num_year4), num_help2_year4/sum(num_year4)...
But idk how to make a sum and a division... an also idk how to make the sum for each year.
Anyone can help me?
I'm using iReport 3.7.2.
Sorry, I'm spanish and my english is not really good.
Post Edited by sgarciaf at 05/20/2010 10:57
3 Answers:
for the sum try to study variables (calculation type: SUM)...
for division the syntax changes if you use Integer or BidDecimal or ... the types that you use to represent the fields from your DB.
try to be more clear in the question...
a very simple way is:
$F{aFieldName_A}.intValue() / $F{aFieldName_B}.intValue()