Always print the header of my report without data

0

Hi all, I state that I'm new in the forum, so not sure if you have already asked the question. I wanted to ask if you can always print the header of my report, even if there is no data in the detail.Aggiungo that the header is a subreport that call every time???

 

Thanks to those who answer me

stefanopepe85's picture
Joined: Oct 14 2013 - 1:38pm
Last seen: 5 years 9 months ago

7 Answers:

0

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

Thank you
for answers

stefanopepe85's picture
Joined: Oct 14 2013 - 1:38pm
Last seen: 5 years 9 months ago
2

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

C-Box

 

C-Box's picture
1622
Joined: Jul 19 2006 - 5:58pm
Last seen: 1 day 19 hours ago

Thanks for the reply

but if I have my subreport in the section title that's okay proceedings??

stefanopepe85 - 5 years 9 months ago
0

Thanks for the reply

but if I have my subreport in the section title that's okay proceedings??

 

stefanopepe85's picture
Joined: Oct 14 2013 - 1:38pm
Last seen: 5 years 9 months ago

Should also work!

C-Box - 5 years 9 months ago

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

Thank you for answers

stefanopepe85 - 5 years 9 months ago
0

Hi,

You can try print when expression for header band.

Write condition in print when expression of header band So that it display only when query returns data.

Try this may be helpful to your requirement.

Thanks

Ajinkya

ajinkya_c's picture
976
Joined: Aug 29 2012 - 6:13am
Last seen: 2 years 4 months ago

Dear Ajinkya, I'm new to Jaspersoft report and then I have to ask but I have to use a particular parameter??

Thanks for the reply

stefanopepe85 - 5 years 9 months ago
0

Dear Ajinkya, I'm new to Jaspersoft report and then I have to ask but I have to use a particular parameter??

Thanks for the reply

 

stefanopepe85's picture
Joined: Oct 14 2013 - 1:38pm
Last seen: 5 years 9 months ago
0

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!?!?)

hth

C-Box

C-Box's picture
1622
Joined: Jul 19 2006 - 5:58pm
Last seen: 1 day 19 hours ago
0

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

stefanopepe85's picture
Joined: Oct 14 2013 - 1:38pm
Last seen: 5 years 9 months ago
Feedback