Skip to main content



      Home
Home » Archived » BIRT » Manipulating the Autotext pagenumber
Manipulating the Autotext pagenumber [message #1163755] Thu, 31 October 2013 03:39 Go to next message
Eclipse UserFriend
Hello,

is there a way to change the start of the autotext pagenumber?
In our project we generate the whole Output from many Reports which were merged after the pdf rendering process. We need a pagenumbering for the generated document, so my idea is to use the autotext pagenumber, but give it an offset, where it should start.

Example
Report1 (3 pages)
Report2 (2 pages)

add an autotextfield pagenumber to the footer of Report1 and Report2. Set an offset to Report1 to "1" and and offset to Report2 to "4". So that the output Pagenumbers from the autotext is

Report 1 Page 1 = 1
Report 1 Page 2 = 2
Report 1 Page 3 = 3
Report 2 Page 4 = 4
Report 2 Page 5 = 5

Another way could be, if i could make it myself in the footer of the masterpage. But how I undestand the rendering, the header and footer would only rendered once for all pages of the report. So I couldn't print differenz values in a field per Page in the footer section of the masterpage. Is this correct or is there a hack to deal with this?

I tested it, but the only results i get was this
Report 1 Page 1 = 1
Report 1 Page 2 = 1
Report 1 Page 3 = 1
Report 2 Page 4 = 2
Report 2 Page 5 = 2


Birt Version : 3.7.1.v20110905

Thomas
Re: Manipulating the Autotext pagenumber [message #1196957 is a reply to message #1163755] Tue, 19 November 2013 12:32 Go to previous messageGo to next message
Eclipse UserFriend
Are you using the runAndRender task? Or separate run and render tasks?
Re: Manipulating the Autotext pagenumber [message #1208778 is a reply to message #1163755] Mon, 25 November 2013 02:07 Go to previous messageGo to next message
Eclipse UserFriend
RunAndRenderTask
final IRunAndRenderTask task = engine.createRunAndRenderTask( design );
[...]
task.run

Re: Manipulating the Autotext pagenumber [message #1219399 is a reply to message #1208778] Tue, 03 December 2013 11:33 Go to previous message
Eclipse UserFriend
If you used separate run and render tasks, you could put a script in the onRender of the autoText element in the masterpage and increment the value by a certain amount. Like this:

this.text = parseInt(this.text) + yourOffset;
Previous Topic:Space between tables in Birt for PDF
Next Topic:Group page break depending on type export
Goto Forum:
  


Current Time: Wed Nov 05 16:32:24 EST 2025

Powered by FUDForum. Page generated in 0.02838 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top