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)
Total page Count has to be customized
Vik
In our reports we support both HTML and Excel. The Excel version is different from HTML. <br />
So we have two tables, one for html and other for excel.For Html report excel is hidden and vise -versa.<br />
Both the tables are separated by Bookmark.<br />
<br />
The rptdocument generated will contain both the tables.<br />
For HTML to get the pageCount in our application we get the page number of the Bookmark and display pages only till the bookmark.<br />
But, in the <strong class='bbc'>master page</strong>, we need to display the pageNumber and the pageCount, e.g page 2 of 30.<br />
Since the rptdocument will contain both HTML and Excel tables data, when we view the HTML table it shows the total page count whereas actually for HTML the total count is the pageNumber of Bookmark.<br />
<br />
e.g.<br />
HTML Table(Table displayed for HTML format, hidden for other formats): Page 1-10<br />
Bookmark: Present at page 10<br />
Excel table(Table displayed for Excel format, hidden for other formats): Page 11-20<br />
<br />
Now for HTML, the report displays CurrentPage is 2 of 20, whereas we have to show only CurrentPage is 2 of 10<br />
<br />
How do we achieve this?
Find more posts tagged with
Comments
mwilliams
If I'm understanding correctly, you could set a persistent global variable with the value of the current page number in the onCreate script of your first table's footer. Then, in your onRender script, you could use this persistent global variable value to replace the total page value for the footer.
mwilliams
If you can create this in a report that I can run, that'd be great. This way I'll know for sure what you're seeing!
Vik
Hi
Please find the rptdesign file below.
mwilliams
Can you explain what I'm looking at here? When I run in a paginated output, I only see a single table and the page number count is always n of 4 or n of 5 (extra page in viewer). Based on your above description, I was expecting to see n of 8 or something, so I must have the issue confused. Can you explain the issue as I see it in this sample? Thanks!
Vik
There are 2 tables, 1 hidden for all formats except HTML and the other hidden for all formats except Excel.
HTML Table
Bookmark
Excel Table
In the viewer we can see only one table, the one not hidden for HTML.
But the rptdocumnet generated will have both the tables. Its only that the visibility of a table is hidden.
Now suppose the HTML table runs from page 1-3 in rptdocument and the Excel table runs from 4-5.
It will always show the page count as 5,since the rptdocumnet contains 5 pages.
When a user is rendering the HTML table and Excel is hidden, although there are 5 pages in the rptdocument,
but only 3 pages will have data(HTML table). So we want the total count to be 3 and not 5.
The bookmark separates both the tables.
Plz lemme know if u need ne further clarifications. Thanks!
mwilliams
So, if I were able to show a report that showed 1 of 3, 2 of 3, and 3 of 3 for the first table and then switched to 1 of 2 and 2 of 2 for the second table, this would suffice? If so, take a look at this:
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1404-group-page-numbering/
It shows page numbering based on group, but this same idea can be applied to different tables or sections. Let me know.