CrossTab in iReport - limitations on it

0

Hi forum,

1) Is there any way or work around to do calculations on top of filled measures ? B'z cross tab fills data at run time...

For eg: I have 4 columns after designing crosstab and if I want to add 3rd+4th then want to print the output in 5th column which is not designed ..

2) I'd a requirement to group by more than 5 rows in row groups but I can group by only upto 4 rows in row groups.. If I add 5 group it is giving me 4th group field/variable value is not found?

   What is the limitation on number of rows groups,column groups and on measures ?

 

 

sadakar's picture
627
Joined: Aug 14 2012 - 3:57am
Last seen: 8 months 2 weeks ago

.

sjoerd.jump - 5 years 6 months ago

1 Answer:

0

For your calculation question, yes thats possible. 

Add a Measure to Measures in your Crosstab.

Adjust the width of the column you want to add the  "totalMeasure" too.

Add a textfield and link your new Variable.
To set up the variable, add a variable in your report. Do the calculations

$V{Var1}+$V{Var2}
Only if you set Groovy as language of your report (in the property sheet)
Otherwise, depending by the value of your variables, you should use something like:
new Double(  $V{Var1}.doubleValue() + $V{Var2}.doubleValue() )

Where Var are the columns from your database.

This should do the trick!

Regards, Sjoerd

link to the calculation answer: 

sjoerd.jump's picture
Joined: Oct 29 2012 - 2:39pm
Last seen: 4 years 7 months ago

A small correction in my question ....
Modified point-1 is :
1) Is there any way or work around to do calculations on top of filled Column groups ? B'z cross tab fills data at run time...

For eg: I have 4 columns after designing crosstab and if I want to add 3rd+4th then want to print the output in 5th column which is not designed ..

sadakar - 5 years 6 months ago
Feedback