how to return blank page when sub-report query is empty

0

Hi,

I have a report with few sub-reports and pictures ect. now I'm looking for a way to return an empty page or throw a message of empty report just in case one of the sub-reports query is returning empty set.

Can Jasper do it? if so, how?

Thanks :)

eliya.tiram's picture
Joined: Aug 31 2015 - 7:59am
Last seen: 1 year 2 months ago

Hi,

  1. Add a No Data section to the sub-report with the text field "No data found for the selected criteria"
  2. From the report properties, select No Data Section for the Option When No Data Type
reportdev - 3 years 9 months ago

Hi,

Thank you for you answer it really helped me understand what No Data section does.

But now I get in the main report all the details I already have in the main report like pictures for instance, or in my case I have data in the main report but not in the sub-report so when I run this I see the data in the main report with the No Data alert that I added.

Is there a way where I can return the whole main report empty just because the sub-report is empty? (the main report has a data but I don't want to show it in the case of empty query in the sub-report).

Thanks a lot for your help :)

eliya.tiram - 3 years 9 months ago

1 Answer:

1

Hi,

  1. Add a No Data section to the sub-report with the text field "No data found for the selected criteria"
  2. From the report properties, select No Data Section for the Option When No Data Type
reportdev's picture
1224
Joined: Oct 12 2015 - 12:05pm
Last seen: 2 months 1 week ago
Feedback