Jump to content
Changes to the Jaspersoft community edition download ×

Always print the header of my report without data

Go to solution Solved by stefanopepe85,

Recommended Posts

  • Replies 11
  • Created
  • Last Reply

Top Posters In This Topic

Set the WhenNoDataType to "AllSectionsNoDetail" within the main-Report and also within the SubReport.

So the PAGE_HEADER (what I assume you used for placing your SubReport) is called once and if your SubReport has also a static design that is also rendered without data (e.g. again a PAGE_HEADER) it is rendered for one page if there are no data.

Also you could use the NO_DATA_SECTION to place your SubReport when there are no data from query or external datasource.. then of course the WhenNoDataType has to be changed accordingly.

hth + regards from Germany



Link to comment
Share on other sites

And finally, one last thing if in that same report I have the data in the detail section I still have the full report ??


If you have placed your SubReport into TITLE Section and set the WhenNoDataType to AllSectionNoDetail, then of course the TITLE (with your SubReport placed inside) will appear nevertheless you have data or not (for the master report).

So you have a  - let me call  - STATIC design for Title that ALWAYS appear. (of course your subReport also should render something regardless any data passed)

(I hope, this is what you actually want to achieve!?!?)



Link to comment
Share on other sites

Excuse me, in practice I have a report that will interface with multiple databases and tables are the same just that some are empty other are full! So I would need a single report that when queries the table if they are empty out the header (subreports) if the tables contain data must exit the subreport with the table

c-box thanks for the help

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...