views:

144

answers:

1

Hi Friends, I am using jasper report and i used JavaBean as datasource. My bean consist of 3 fields namely Type,Name,Designation. I need to group data according to the same Type value. But as far i understand we can able to group only consecutive data. But my bean list does not returning array list in a consecutive order (Ex: Consider my List consist of 4 values first and third value consist of Type "A" and Second and Fourth value consist of Type "B").Is it possible to group this kind of non consecutive list using jasper report? If not please tell me how to achieve this functionality.
Thanks in advance...

A: 

Sort the ArrayList first.

Collections.sort( yourArrayList );
Dave Jarvis