Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Suppressing header elements on first page
uhd
I am testing BIRT 2.5.1 for our company report production and my goal is to create a document, lets say a company letter, where the header (and/or the footer) on the first page is/are different from the following pages.
A solution for this standard requirement seems not be implemented in a straight-forward way in BIRT (or seems to be buggy as the "Show header on first" switch, which is not working at all for word output).
I was happy to find a hint in a post, where by defining an onRender-Script for the element on the Master-Page header/footer, I am able to suppress elements in the header/footer on the following pages.
The script is:
if(pageNumber > 1){
this.getStyle().display ="none"
}
Now I thought, that this could be a way to suppress elements also on the first page, which would perfectly solve my initial problem, but if I say:
if(pageNumber = 1){
this.getStyle().display ="none"
}
in the onRender-Script, the element is suppressed on all Pages.
As I do not (yet) understand enough the structure of the objects in BIRT:
Why does the script not work ? How can I suppress an element on the first page, but not on the following ?
What is the best method to set up a company letter with different Header/Footer on the first and the following pages ?
Find more posts tagged with
Comments
mwilliams
Hi uhd,
What is on your first page compared to the rest of the pages? Is the first page the company logo and title and what not? And then the second page on is a table or something? If so, you can use different master pages and attach one to the items on the first page and use the second one for the items that will be on the following pages. Let me know.
uhd
Thank yo for your response...
My example:
I have one table in the report.
On the first page I want e.g. a big logo and on the following pages a small logo on the header.
I want a footer on every page except the first one.
So, if I follow your proposition, how do I assign the first Masterpage to the first printed page and the second to the following pages (If I could do this, this would solve my problem)
mwilliams
uhd,
Unfortunately, how it's currently set up, I'm pretty sure it has to be a different report element to change the master page. You can't switch within a given table. So, for your case, creating a separate table with the first N lines (however many will fit on the first page) in it with the rest of the data filtered out and then a second table with those first N lines filtered out with the second master page and page break before = always selected, may be the way to go.