views:

193

answers:

1

Hello, I want to use java.util.HashMap as variable in jasper report. I want to save group names of my report in a HashMap.
I have tired and declared a variable of class java.util.HashMap and its expression field is $V{variable1}.put($F{GROUPCOLUMNVALUE}, $F{GROUPCOLUMNVALUE}) but it gives does not works and gives null when I print it on report's group footer

I am using iReport 3.7.3

A: 

I tried it there and got it working.

I set the following properties on the variable:

  • Variable class: java.util.HashMap()
  • Reset type: None
  • Calculation: System
  • Variable expression: new java.util.HashMap()
Gordon