Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Manipulating the Autotext pagenumber
Manipulating the Autotext pagenumber [message #1163755] Thu, 31 October 2013 07:39 Go to next message
Thomas P. is currently offline Thomas P.Friend
Messages: 25
Registered: April 2012
Junior Member
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


Thomas
Re: Manipulating the Autotext pagenumber [message #1196957 is a reply to message #1163755] Tue, 19 November 2013 17:32 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Are you using the runAndRender task? Or separate run and render tasks?

Michael

Developer Evangelist, Silanis
Re: Manipulating the Autotext pagenumber [message #1208778 is a reply to message #1163755] Mon, 25 November 2013 07:07 Go to previous messageGo to next message
Thomas P. is currently offline Thomas P.Friend
Messages: 25
Registered: April 2012
Junior Member
RunAndRenderTask
final IRunAndRenderTask task = engine.createRunAndRenderTask( design );
[...]
task.run



Thomas
Re: Manipulating the Autotext pagenumber [message #1219399 is a reply to message #1208778] Tue, 03 December 2013 16:33 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

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;


Michael

Developer Evangelist, Silanis
Previous Topic:Space between tables in Birt for PDF
Next Topic:Group page break depending on type export
Goto Forum:
  


Current Time: Sat Apr 27 00:06:36 GMT 2024

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

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

Back to the top