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)
Master Page Element Visibility
Rico Milto
Hello Forum:
My first post and I am a member since yesterday and I am new to BIRT but not new to Report Development.
What I am attempting to do is the following use case:
On MasterPageMain, if the current page number is greater then 1, do not show the footer OR the grid in the footer.
I've tried to no avail to set the grid's visiblity to "NONE" based upon the pageNumber variable
this.getStyle().display = "NONE"
it is not working. Is there an alternative or maybe im approaching this incorrectly and could use your advise.
places i've tried to append script (1) onRender of Grid (2) onCreate of MasterPage
Find more posts tagged with
Comments
mwilliams
What is your BIRT version? Can you recreate your issue with the sample "Classic Models" database that comes with BIRT, so that I can see exactly what you're doing?
johnw
The script in the onRender event
if (pageNumber > 1)
{
this.getStyle().display = "none";
}
will work just fine. The caveat being that it will only work in the HTML emitter. It doesn't seem to work in any of the others. I imagine it has to do with the layout engine used in those emitters.
mwilliams
John,
I'm guessing he's on 2.6 or earlier, where there were page break script issues that caused the pageNumber variable to not increment or at least to not increment properly.
johnw
Possibly. If thats the case he can use the script outlined here to get an accurate page number.
http://digiassn.blogspot.com/2009/07/birt-using-reflection-to-get-total-page.html
The issue will apply to HTML vs other emitters though.
Rico Milto
Gentlemen
First let me say "thank you so much for responding to my post" and then let me say what a idiot I am. I placed the code in a sub grid in the masterpage footer and didnt not notice until i was in outline view. Once I placed the code in the parent grid it worked.
mwilliams
You're welcome. Let us know when you have any questions!