Tobia
Tobia

Reputation: 9519

How do I use Jasper report with empty details?

I want to print the title and footer band of a report even if there is no details row (empty list or null). Is this the default behavior of Jasper Report?

I'm getting an empty blank page instead of only title-footer bands and I cannot understand if there is a problem in my report or if Jasper works like this.

Upvotes: 0

Views: 2803

Answers (2)

Sree
Sree

Reputation: 11

You can use the property whenNoDataType="AllSectionsNoDetail" in the source code.

When we use this property all sections other than detail band will appear when there is no data. By default ,it is whenNoDataType="NoPages" i.e. when the list is empty , the page will be blank.

Upvotes: 0

dada67
dada67

Reputation: 5113

Set whenNoDataType="AllSectionsNoDetail", the default is NoPages.

In Jaspersoft Studio you can set the attribute in the Report Properties view.

Upvotes: 5

Related Questions