Wednesday, August 8, 2012

Jasper subreport duplicate values

When you printing a collection of data, you have to use a subreport to print data.

There are parameters, that you can use to customize your printing.

But, default parameters set subreport to print duplicate values. To avoid that change following parameters as mentioned below.

In subreport component,

Print When Detail Overflows true
Stretch Type Relative to Tallest Object

In the components inside the subreport,

Print Repeated Values true
Remove Line When Blank  false
Print In First Whole Band         false
Print When Detail Overflows false
Blank When Null    true
Stretch With Overflow true
Stretch Type Relative to Tallest Object

This changes works fine in both iReport 3.5 & 3.7 versions.