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 icons in footer
shanuma
<p>In my report I have 4 icons in the footer (on the master page).</p>
<p> </p>
<p>The icons are icon1, icon 2, icon 3 and icon 4.</p>
<p> </p>
<p> </p>
<p>I want to show only icon-1 in the first page. show icon-2 in second page. Icon-3 in third page. Icon-4 in fourth page.</p>
<p> </p>
<p>How can I hide the other icons based on the page number?</p>
<p> </p>
<p> </p>
<p> </p>
<p>Any idea on this?</p>
Find more posts tagged with
Comments
mwilliams
Have you tried the onRender of each icon?<br><br>if(pageNumber != 1){ //2, 3, and 4 for the other icons<br>this.getStyle().display = "none";<br>}<br><br>or something like that?
shanuma
<p>Hi Guru,</p>
<p> </p>
<p>Thanks for your reply.</p>
<p> </p>
<p>I tried that. But it does not work. </p>
<p> </p>
<p>I believe that the header and the footer in the masterpage are static. The only dynamic thing I can have in both these header and footer is DynamicText.</p>
<p> </p>
<p>Javascript works only for DynamicText.</p>
<p> </p>
<p> </p>
<p>/Uma</p>
mwilliams
What's your BIRT version? I'll try to make you an example.
shanuma
<p>Hi Williams.</p>
<p> </p>
<p>Thanks for the response.</p>
<p> </p>
<p>My Birt version is 4.4.1.</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>/Uma</p>
mwilliams
Take a look at this example. It has two images in the footer that alternate based on the page numbers. Be sure to run it in the web viewer.
shanuma
<p>Now it works!!</p>
<p> </p>
<p>Thanks a lot!!</p>
mwilliams
Not a problem. Glad to help. Let us know whenever you have questions.
shanuma
<p>Hi Williams,</p>
<p> </p>
<p>It works in your sample file, probably because it was run from birt "View Report".</p>
<p> </p>
<p>In my case it does not work. Because, my "On Render" is called only once. So, the result is the same what I am supposed to have on the first page.</p>
<p> </p>
<p>I confirmed that the "On Render" method is called only once by setting an "Event Handler" to the image. Is there any other way to solve this problem?</p>
<p> </p>
<p> </p>
<p>/Uma</p>
mwilliams
Running in the viewer only forces the frameset servlet to run, which is the separate run and render task implementation. If you're outputting to PDF and want to see this in action, just run the report in the web viewer, then change the format url parameter to pdf and execute the new url. You could also run to PDF from the designer and then change the preview/run portion of the url to frameset and you'd see the same thing. Hope this helps.