Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » How to force page break after group in HTML but not in PDF?
How to force page break after group in HTML but not in PDF? [message #489267] Fri, 02 October 2009 07:42 Go to next message
Eclipse UserFriend
Originally posted by: thilo.bruesshaber.gmail.com

Hi,

does sombody know how to force a page a pagebreak after say each fifth
group in HTML output. In PDF export I want to have an automatic
pagebreak instead.
I guess this can only achieved using scripts, but I don't know how.
Any ideas?

I'm using BIRT 2.5.0.

Thanks in advance,
Thilo
Re: How to force page break after group in HTML but not in PDF? [message #490513 is a reply to message #489267] Thu, 08 October 2009 21:40 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Hi Thilo,

Take a look at this example:

http://www.birt-exchange.org/devshare/designing-birt-reports /1057-removing-page-break-after-group-depending-on-output-fo rmat-example/#description

It should show you how to set the page break after setting for the group depending on the output type.

Hope this helps.

Regards,

Michael Williams
www.birt-exchange.org
Re: How to force page break after group in HTML but not in PDF? [message #490515 is a reply to message #490513] Thu, 08 October 2009 21:45 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

For some reason when I pasted the link to the report it added a space in the word "format". Copy and paste the link and delete that space and you'll get there. Smile

Michael



Michael

Developer Evangelist, Silanis
Re: How to force page break after group in HTML but not in PDF? [message #490617 is a reply to message #490513] Fri, 09 October 2009 12:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: thilo.bruesshaber.gmail.com

Hi Michael,

thank you for your example!
Unfortunately it's not doing what I want to achieve.
I need to have a page break after each 5th group in HTML and no (forced)
page breaks in PDF.

I solved this using a global counter that counts each group.
The counter will be increased in the onCreate event of the group header.
Afterwards I'm checking in a hidden group footer if it was the 5th group
and what's the current output format. If it's HTML and it is a 5th group
(counter%5 == 0) then the group footer (with a height of 0) is set visible.
The group footer itself is set to pageBreakAfter=Always. This pagebreak
is only rendered if the group footer is not hidden.

Maybe this helps if someone is facing the same problem.

--Thilo

PS: Hope my English is understandable!?

Michael schrieb:
> Hi Thilo,
>
> Take a look at this example:
>
> http://www.birt-exchange.org/devshare/designing-birt-reports
> /1057-removing-page-break-after-group-depending-on-output-fo
> rmat-example/#description
>
> It should show you how to set the page break after setting for the group
> depending on the output type.
>
> Hope this helps.
>
> Regards,
>
> Michael Williams
> www.birt-exchange.org
Re: How to force page break after group in HTML but not in PDF? [message #490673 is a reply to message #490617] Fri, 09 October 2009 16:10 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Thilo,

Sorry, I misread your first post. Smile

The way in the example I posted may work if you determined the group break on a counter as well as the output type. I'd have to modify it to try to see. Anyways, glad you found a solution!

Regards,

Michael Williams
www.birt-exchange.org
Previous Topic:Apply several styles
Next Topic:List Box report parameters - access to Display Text?
Goto Forum:
  


Current Time: Sat Apr 27 00:29:43 GMT 2024

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

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

Back to the top