views:

315

answers:

1

I'm using Jasper Reports to generate reports from Hibernate model instances. To do this I'm passing the data using a JRBeanCollectionDataSource. Each model instance has a "sequence" number, the report is grouped by this number.

My problem is that I need to print a message like "There are no items with this sequence number" if there is an empty group in the report. I have no clue how to do this, somehow I need to pass the full list of possible sequence numbers into the report, and determine when none of the beans have the current group's sequence number.

Can someone point me in the right direction?

Thanks.

A: 

What about extending appropriate datasource class and adding lacking records manually? Then in report definition they will be treated as "There are no items with this sequence number" and grouping formula will be untouched.

cetnar