stefanopepe85 Posted October 14, 2013 Share Posted October 14, 2013 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 Link to comment Share on other sites More sharing options...
C-Box Posted October 15, 2013 Share Posted October 15, 2013 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 GermanyC-Box Link to comment Share on other sites More sharing options...
stefanopepe85 Posted October 15, 2013 Author Share Posted October 15, 2013 Thanks for the reply but if I have my subreport in the section title that's okay proceedings?? Link to comment Share on other sites More sharing options...
stefanopepe85 Posted October 15, 2013 Author Share Posted October 15, 2013 Thanks for the replybut if I have my subreport in the section title that's okay proceedings?? Link to comment Share on other sites More sharing options...
C-Box Posted October 15, 2013 Share Posted October 15, 2013 Should also work! Link to comment Share on other sites More sharing options...
Solution stefanopepe85 Posted October 15, 2013 Author Solution Share Posted October 15, 2013 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 Link to comment Share on other sites More sharing options...
stefanopepe85 Posted October 15, 2013 Author Share Posted October 15, 2013 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 Link to comment Share on other sites More sharing options...
ajinkya_c Posted October 15, 2013 Share Posted October 15, 2013 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.ThanksAjinkya Link to comment Share on other sites More sharing options...
stefanopepe85 Posted October 15, 2013 Author Share Posted October 15, 2013 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 Link to comment Share on other sites More sharing options...
stefanopepe85 Posted October 15, 2013 Author Share Posted October 15, 2013 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 Link to comment Share on other sites More sharing options...
C-Box Posted October 15, 2013 Share Posted October 15, 2013 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!?!?)hthC-Box Link to comment Share on other sites More sharing options...
stefanopepe85 Posted October 16, 2013 Author Share Posted October 16, 2013 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 tablec-box thanks for the help Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now