Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » getting rid of pagebreaks in script
getting rid of pagebreaks in script [message #1162914] Wed, 30 October 2013 18:09 Go to next message
Gibran Shah is currently offline Gibran ShahFriend
Messages: 33
Registered: September 2013
Member
Hello,

I'm wondering if there is a way to get rid of pagebreaks in script. I'm trying to do this in the beforeRender handler of the report. I can get elements by name and by ID:

var elmByName = reportContext.getDesignHandle().getElementByName("Joe");
var elmById = reportContext.getDesignHandle().getElementByID("123");

Now that I have these elements, I want to iterate through their children looking for pagebreak. Something like:

for (var i = 0; i < elmByName.children.length; i++)
{
if (elmByName.children[i].tagName == "pagebreak")
{
deleteElement(elmByName.children[i]);
}
}

But there doesn't seem to be such a function or field or property as "children" in the element. How does one iterate through an element's children?

BTW, I've tried to suppress pagebreaks through the usual methods to no avail. I have two threads going:

http://www.birt-exchange.org/forum/index.php?/topic/30545-cant-get-rid-of-page-break/
http://www.eclipse.org/forums/index.php/m/1162674/#msg_1162674

...but no one has answered.
Re: getting rid of pagebreaks in script [message #1196949 is a reply to message #1162914] Tue, 19 November 2013 17:29 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Can you explain more about what you're trying to accomplish? Are you wanting page breaks sometimes and not others? Let me know.

Michael

Developer Evangelist, Silanis
Previous Topic:Show empty text elements in report
Next Topic:borders not set right on grid cell
Goto Forum:
  


Current Time: Thu Apr 25 08:11:57 GMT 2024

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

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

Back to the top