BIRT 2.5.1: IReportDocument.getPageNumber(bookMark) returns wrong page number? [message #513543] |
Wed, 10 February 2010 09:33  |
Eclipse User |
|
|
|
Hello,
I'm using IReportDocument.getPageNumber(bookMark) (in BIRT 2.5.1) to get the page numbers for my bookmarks (which are then afterwards used to create a table of contents within a PDF document). You can see an example of this document HERE. As you can see from the example, the page numbers are wrong. They start of fine with items 1 and 2 but "3. Profielen" should have page number 5 instead of 4 (all items beyond this one have wrong numbers).
Is there something I am missing about the internal functioning of the getPageNumber-method? The way I set it up is that I marked all relevant parts of my report with bookmarks. Then I use RunTask to get an intermediate rptdocument and use that to get the bookmarks (and accompanying page numbers). These are then stored in a Map (key=bookmark string, value=page number) and added to the appContext of the RenderTask. Using a custom Java event handler (on dynamic text) I then replace the original value of the dynamic text (which is the same as the bookmark string) with the page number (using the original value of the dynamic text as the key lookup value in the Map).
Any help would be greatly appreciated as I'm a bit stuck since I would expect the getPageNumber-method to simply return me the correct page number.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04177 seconds