1
votes

I have designed a report using iReport 4.5 and Oracle stored procedures that returns ref cursors.

When I pass a correct parameter the report successfully returns data. all good till now.

When I pass a incorrect parameter the iReport designer displays No Data to display message so I changed the report property "When No Data" to "All Sections, No Detail" - all good till now.

But my business requirement is to display a dummy band with a message stating "No Data to Display" and this band will display only when the stored procedures returns no records and this band should not display when the stored procedure returns data. how do i do that...

Thanks for your help with this.

Meeza

1

1 Answers

6
votes

With the "When No Data" option you can also use the "No Data Section" option. That will then only show the "No Data" section of the report when there are no records returned. The only issue with this is that you will lose any other headers that are in the rest of the report. You can work around this by creating a main report with all of the headers/footers needed then create a subreport that contained the query for the records and the "No Data" section.