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)
Separate master page for last page of the report
RepBIRT
<p>I have a requirement where the last page of the report should have extra label displayed in the footer. The number of pages are unknown.</p><p> </p><p>How to handle this aspect using the masterpage.</p><p> </p><p> </p><p>Any ideas/ reference would be of great help.</p>
Find more posts tagged with
Comments
kclark
<p>You could create a grid in the footer with one column and two rows. Then have your label for each page in the first cell. Then in your second cell have your "last page label" and then do something like this from the onCreate() of that label.</p><pre class="_prettyXprint">if(pageNumber == totalPage) { this.text = "test"}</pre>
RepBIRT
<p>Thanks for your response!</p><p> </p><p>I am trying out something like this one. But the script is not working. Always getting page number as 1.</p><p> </p><p><strong>[color=#7f0055;][font="'courier new';"]<span style="font-size:10pt;">if[/color][/font]</span></strong>[color=#000000;][font="'courier new';"]<span style="font-size:10pt;"> (parseInt(reportContext.getPageVariable([/color][/font]</span>[color=#2a00ff;][font="'courier new';"]<span style="font-size:10pt;">"pageNumber"[/color][/font]</span>[color=#000000;][font="'courier new';"]<span style="font-size:10pt;">)) <= 1)[/color][/font]</span></p><p>[color=#000000;][font="'courier new';"]<span style="font-size:10pt;">{[/color][/font]</span></p><p><strong>[color=#7f0055;][font="'courier new';"]<span style="font-size:10pt;">this[/color][/font]</span></strong>[color=#000000;][font="'courier new';"]<span style="font-size:10pt;">.getStyle().display = [/color][/font]</span>[color=#2a00ff;][font="'courier new';"]<span style="font-size:10pt;">"NONE"[/color][/font]</span>[color=#000000;][font="'courier new';"]<span style="font-size:10pt;">;[/color][/font]</span></p><p>[color=#000000;][font="'courier new';"]<span style="font-size:10pt;">}[/color][/font]</span></p><p> </p><p>[color=#000000;][font="'courier new';"]<span style="font-size:10pt;">Moreover how to get the value for the variable pageNumber and totalPage for the script you have suggested.[/color][/font]</span></p><p> </p><p>[color=rgb(0,0,136);]if[/color][color=rgb(102,102,0);]([/color]<span>pageNumber </span>[color=rgb(102,102,0);]==[/color]<span> totalPage</span>[color=rgb(102,102,0);])[/color]<span> </span>[color=rgb(102,102,0);]{[/color]</p><p><span> </span>[color=rgb(0,0,136);]this[/color][color=rgb(102,102,0);].[/color]<span>text </span>[color=rgb(102,102,0);]=[/color]<span> </span>[color=rgb(0,136,0);]"test"[/color]<br />
[color=rgb(102,102,0);]}[/color]</p>