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)
totalPage value is not correct on Master Page
Alena Li
<p>Hello BURT experts,</p>
<p> </p>
<p>I am newbie of BIRT. There is a requirement need to display Master Page content if it is the last page. I believe it is a pretty common requirement.</p>
<p>The theory seems straightforward. I add a grid to enclose the content, which I only want to show on the last page. On the Grid onRender() method, I add the following code:</p>
<p> if (pageNumber == totalPage){</p>
<p> this.getStyle().display="block";</p>
<p> }else{</p>
<p> this.getStyle().display="none"l</p>
<p> }</p>
<p>But it does not work! Then I checked the value of pagenUmber and totalPage by using</p>
<p><viewtime-value-of>pageNumber</viewtime-value-of></p>
<p><viewtime-value-of>totalPage</viewtime-value-of></p>
<p> </p>
<p>The interesting things happen. pageNumber is populated correctly, but totalPage is populated as the same value as pageNumber. However, "Total Page Count" Auto Text tool is populate correct value. But how to access it?</p>
<p> </p>
<p>It seems a bug. </p>
<p> </p>
<p>Thank you for any update or confirmation.</p>
<p>Alena</p>
<p> </p>
<p> </p>
<p> </p>
Find more posts tagged with
Comments
JFreeman
<p>How are you generating the report?</p>
<p>If you have separate run and render tasks, something like this should work in the onRender of the grid:</p>
<pre class="_prettyXprint _lang-js">
if(pageNumber < totalPage){
this.getStyle().display = "none";
}
</pre>