Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Dynamic Page Break(How can I create a dynamic page break in Birt)
Dynamic Page Break [message #1014837] Tue, 26 February 2013 15:07 Go to next message
Pamella Lowe is currently offline Pamella LoweFriend
Messages: 4
Registered: February 2013
Junior Member
Can anyone help me? I am trying to create a dynamic page break in Birt 3.0. I am using a page break parameter and putting the following:

"if (BirtComp.equalTo(params["PageBreak"], true) && Total.count() != Total.runningCount()) {
this .getStyle().pageBreakAfter = "always";
}"

On the script tab - drop down (On create). This is all on a label located on the table footer.

Is there something that I am missing?
Re: Dynamic Page Break [message #1014945 is a reply to message #1014837] Tue, 26 February 2013 22:06 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Can you look in the XML Source of your report design and paste the version info from the top few lines into here, so I know which BIRT version you're using. 3.0 is not a BIRT version. Even better, if you can create an example using the sample database, with your version and just attach it in here, that'd allow me to see everything you're doing and to test with the same file.

Michael

Developer Evangelist, Silanis
Re: Dynamic Page Break [message #1014950 is a reply to message #1014945] Tue, 26 February 2013 22:29 Go to previous messageGo to next message
Pamella Lowe is currently offline Pamella LoweFriend
Messages: 4
Registered: February 2013
Junior Member
<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.16" id="1">
<property name="createdBy">Eclipse BIRT Designer Version 2.3.0.v20080606 Build &lt;2.3.0.v20080618-0630></property>
Re: Dynamic Page Break [message #1014961 is a reply to message #1014950] Tue, 26 February 2013 23:18 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Thanks! Okay. So, what you're wanting to do is to accept a parameter to decide whether to page break at the end of a group or not? Or is this to simply page break after a table. Please let me know a little more detail and I'll make a sample report.

Michael

Developer Evangelist, Silanis
Re: Dynamic Page Break [message #1014964 is a reply to message #1014961] Tue, 26 February 2013 23:21 Go to previous messageGo to next message
Pamella Lowe is currently offline Pamella LoweFriend
Messages: 4
Registered: February 2013
Junior Member
Yes, I would like to page break at the end of a table. I have the script in a label at the end of a table and the pagebreak is set to "Auto". If I set the pagebreak to "Always" it works to break always, but sometimes my user would like to print it all together in pdf format. Thank you for your help.
Re: Dynamic Page Break [message #1014968 is a reply to message #1014837] Wed, 27 February 2013 00:00 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Take a look at the script in the onCreate of the table's footer row. If the checkbox parameter is selected, there is a page break. If it's not, there isn't. Let me know if this isn't quite what you're looking for.

Michael

Developer Evangelist, Silanis
Re: Dynamic Page Break [message #1015150 is a reply to message #1014968] Wed, 27 February 2013 15:24 Go to previous messageGo to next message
Pamella Lowe is currently offline Pamella LoweFriend
Messages: 4
Registered: February 2013
Junior Member
this is what I want to do, but even when I do all of that it does not work. I have the code and the pagebreak from the library, but when I reset the pagebreak to "Auto" so it will rely on the script, it does not page break at all. See attachment.
  • Attachment: Sample.jpg
    (Size: 90.77KB, Downloaded 932 times)
  • Attachment: Doc1.docx
    (Size: 37.71KB, Downloaded 557 times)
Re: Dynamic Page Break [message #1015276 is a reply to message #1015150] Thu, 28 February 2013 02:23 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Can you recreate your issue with the sample database, so that I can run the report and test on it? Thanks!

Michael

Developer Evangelist, Silanis
Previous Topic:soap calls viewerservlet
Next Topic:How to fix y-axis values in chart
Goto Forum:
  


Current Time: Thu Apr 18 04:09:07 GMT 2024

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

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

Back to the top