Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Hide group headers on only footer pages
mtrichar
We currently have many reports at out location where the groupings are set dynamically at runtime. This is no problem in BIRT, because you can delete the unwanted groups in the beforeFactory method. Because we never know which group will be just above the data, the headings are repeated at each group and unwanted ones are hidden at runtime. The group footers are used to display a page full of totals and calculations reset at each grouping. The problem is that, even though the footers are on their own page where there are no data rows, the group headers still show up. I need to hide the headers only on the footer pages, where there are no data rows. I would greatly appreciate any ideas.
G1 Unit: 1
G1 | Account | Amount |
G2 Unit: 1 Staff: Smith, Bill
G2 | Account | Amount | <- Good header
123 $10
456 $20
(New Footer Page)
| Account | Amount | <- Unwanted header
G2 Total Accounts: 2
Total Amount: $30
(New Footer Page)
| Account | Amount | <- Unwanted header
G1 Total Accounts: 2
Total Amount: $30
Find more posts tagged with
Comments
mwilliams
Can you recreate your issue with the sample database and attach the report?
mtrichar
Michael,
Thank you so much for taking an interest in my issue. I have attached a report, using the BIRT sample database. You would have to run it as a PDF to see my problem. I have the footers set up to break before and after each new grouping. Since I am not placing the column headers in the normal spot, they are showing up even when there are no data rows. It is logical that this would happen, but I would like to try to hide them. I have totally run out of ideas and hope that you can help.
Michael
mtrichar
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="110249" data-time="1349739620" data-date="08 October 2012 - 04:40 PM"><p>
Can you recreate your issue with the sample database and attach the report?<br /></p></blockquote>
<br />
Michael,<br />
<br />
I think I hit the incorrect reply button to respond to your message. I have attached the file you requested to my other reply.<br />
<br />
Thanks,<br />
Michael
mwilliams
In this example, there are no multi-page groups, so you could just deselect the "repeat header" option in your table group editor. However, if your actual report has multi-page groups, before the footer page, and you want the header to show on those pages, this won't work. For that, you could do something like the attached. Be sure to run it in the web viewer and then export to pdf, so that the separate run and render tasks are used. Take a look at the script in the group footer grid and in the group header rows. The grid's is the onCreate and the headers' is the onRender.
mtrichar
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="110319" data-time="1349812349" data-date="09 October 2012 - 12:52 PM"><p>
In this example, there are no multi-page groups, so you could just deselect the "repeat header" option in your table group editor. However, if your actual report has multi-page groups, before the footer page, and you want the header to show on those pages, this won't work. For that, you could do something like the attached. Be sure to run it in the web viewer and then export to pdf, so that the separate run and render tasks are used. Take a look at the script in the group footer grid and in the group header rows. The grid's is the onCreate and the headers' is the onRender.<br /></p></blockquote>
<br />
Thank you very much for the quick response. I will try it out now.
mtrichar
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="110319" data-time="1349812349" data-date="09 October 2012 - 12:52 PM"><p>
In this example, there are no multi-page groups, so you could just deselect the "repeat header" option in your table group editor. However, if your actual report has multi-page groups, before the footer page, and you want the header to show on those pages, this won't work. For that, you could do something like the attached. Be sure to run it in the web viewer and then export to pdf, so that the separate run and render tasks are used. Take a look at the script in the group footer grid and in the group header rows. The grid's is the onCreate and the headers' is the onRender.<br /></p></blockquote>
<br />
Michael,<br />
<br />
You are the greatest! Thank you sooooooo much! It worked perfectly.<br />
<br />
Michael R
mwilliams
You're very welcome! Let us know whenever you have questions!
mtrichar
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="110348" data-time="1349848130" data-date="09 October 2012 - 10:48 PM"><p>
You're very welcome! Let us know whenever you have questions!
<br /></p></blockquote>
<br />
Michael,<br />
<br />
So sorry to bother you again with this, but in all my excitement to see it work, I never tried it out on the server. When I take the report and place it on the 3.7.2 Runtime (on JBoss) server, it doesn't work anymore. We call it like this: "<a class='bbc_url' href='
http://10.9.23.44:8080/birtweb/run?__report=headers.rptdesign&__format=pdf'>http://10.9.23.44:8080/birtweb/run?__report=headers.rptdesign&__format=pdf"</a><br
/>
<br />
Why would it only work if accessed one way? Is this a bug or am I just not understanding something?<br />
<br />
Thanks,<br />
Michael
mwilliams
Instead of "run", use "frameset". You need the separate run and render tasks, for this to work.
mtrichar
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="110372" data-time="1349888211" data-date="10 October 2012 - 09:56 AM"><p>
Instead of "run", use "frameset". You need the separate run and render tasks, for this to work.<br /></p></blockquote>
<br />
Again, thank you. Sorry for the noob question. I become more impressed with BIRT every day and reading your comments to everybody's questions online helps very much.
mwilliams
Not a problem!
lonofit
<p>I know this post is very old but as I just found it and have the same requirement I would like to come back to it.</p><p> </p><p>I found the given solution does not work if the details group breaks across multiple pages. After reducing the page size to a height of 5 in the group headers are only hidden on the page right after the first page for a country. Country USA starts on page 53 and the group headers are hidden on page 54 when they should be hidden on page 55 where only the footer is rendered.</p><p> </p><p>How can this be fixed? Maybe there even is a non scripting solution to the problem in the latest BIRT release?</p>
mwilliams
<p>If I set the page break to a smaller value to cause it to break across multiple pages, it works fine. It appears that there is an issue with the incrementing of the pageNumber variable. Setting the page break interval to 0 and the page layout to fixed, which should handle that does not seem to be working. Let me see if I can figure something else out. If you can set a page break interval, it should work fine.</p>