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)
Conditional visibility block on last page
joebordes
Hi,<br />
<br />
I have created a BIRT report with a block of text and variables in the footer. After searching for a while, I have added to the visibility condition of this block the next script:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>if(pageNumber < totalPage){
this.getStyle().display ="none"
}</pre>
<br />
and this works fine in HTML and I get the block only on the last page, but when I print to PDF from the viewer, the output ignores it and doesn't show the block on any page.<br />
<br />
My versions:<br />
Viewer Version : 2.5.1<br />
Engine Version: 2.5.1<br />
JRE version: 1.6.0_22<br />
<br />
Joe<br />
TSolucio
Find more posts tagged with
Comments
mwilliams
Hi Joe,
Have you tried logging the pageNumber and totalPage variables to see what you're getting for them? If you add page n of m to your masterpage footer, do the correct values show up in PDF?
joebordes
Hi Michael,<br />
<br />
I put in this code:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><value-of>pageNumber</value-of> of <value-of>totalPage</value-of></pre>
and it always gives me "1 of 1"<br />
Below that I put the autotext Page n of m and it works correctly.<br />
Curious thing is that it works in HTML birt viewer but not in PDF (see attached images)<br />
<br />
Thanks<br />
Joe<br />
TSolucio
mwilliams
Can you recreate your issue with the sample database and attach the report in here. I wanna try something using variables.
joebordes
Find report attached which shows the same behavior against sample database.
thanks
Joe
TSolucio
mwilliams
Joe,
Ok, I was unable to come up with something for PDF. I get the same issue with PDF as you already were. This is also an issue in 2.6.1. It's a little different, but pretty much the same issue. Please log a bug for this at
http://www.birt-exchange.org/org/resources/bug-reporting/
. You might search the bugs to make sure it hasn't been reported already, which it probably has. If you don't find anything, please log it and post the info in here. Thanks!
joebordes
I found the bug reported:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=215231
Thank you very much for your time.
Have a nice weekend
Joe
TSolucio