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)
how to display page numbers in body content
Muthul
Please advise how to display page numbers in table body content
If Page number is 1, we display blank text.
If page number is 2, I want to display (Continued from Page 1)
and continuing till last page.
Find more posts tagged with
Comments
mwilliams
You want to display this in the table body? Or would the masterpage header work?
Muthul
Michael,
I wanted to display it in the table body. Many thanks for your support.
Muthul
Michael,
Any luck in displaying page numbers in the table body.
mwilliams
The problem with displaying in the table body is that you can't put this in the table header because I believe it's only rendered once, so nothing changes within it. You could put in an interval group that allows the amount of rows in a group that will fit on a single page and use the group header for this. Another option might be to use an extra detail row and put your label in there, but only show the first one after a page break. Depending on which version of BIRT you're using, this should work. There are some bugs within older versions that might keep it from working though. What is your version?
Muthul
Michael,
I too agree with you if continuation from page number display is placed alongside table report title it could show up only once. This is a constraint.
I'm currently using BIRT 2.6.2 Series.
mwilliams
This is close on changing the title to say continued using the detail row. For some reason after the first page, a detail row is coming before the title. So, for some reason the variables I'm using are not getting set before the first line. If you worked with it a little bit, you could probably get it. Using the masterpage would be easy, but this is a workaround.
Muthul
Hi,
Does BIRT 3.7 Series provide options to display page numbers in table body content without any issues.
If Page number is 1, display blank text.
If page number is 2, display (Continued from Page 1)
and continuing till last page.
Please advise.
Thanks and Regards,
Muthul.
mwilliams
I've got something even better for you. A new feature that I didn't know snuck into BIRT 2.6.2 was the <viewtime-value-of> tag. This tag isn't evaluated until render time, so you're able to put something like the following into a HTML textbox in your report and you'll get what you're wanting as long as you're running the separate run and render tasks.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
Page <VIEWTIME-VALUE-OF>if (pageNumber == 1){
pageNumber.toString();
}
else{
pageNumber.toString() + " (continued from Page 1...)"
}</VIEWTIME-VALUE-OF>
</pre>
<br />
Hope this helps. This also will work in 3.7 and beyond if you're thinking of upgrading.
Muthul
Thanks a lot Michael.
I changed a bit and got it working.
<VIEWTIME-VALUE-OF> if (pageNumber == 1){} else {"(Continued from Page " + (pageNumber.toString() -1) + ")"}</VIEWTIME-VALUE-OF>
Many Thanks.
mwilliams
You're very welcome! I thought that was only a 3.7 feature, but found that it actually was introduced in 2.6.2 just recently!