Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 238326

Summary: [Improve Page Break Management] Page Brake Needed Report problem in PDF
Product: z_Archived Reporter: José Mejia <jtopete>
Component: BIRTAssignee: Gang Liu <hustlg>
Status: VERIFIED FIXED QA Contact: Xiaodan Wang <xwang>
Severity: critical    
Priority: P3 CC: bluesoldier, hustlg, rlu, wyan
Version: 2.2.2Keywords: plan
Target Milestone: 2.5.0 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard: Obsolete
Attachments:
Description Flags
PDF example to view the problem
none
PDF example to view the problem none

Description José Mejia CLA 2008-06-24 16:25:52 EDT
Report problem in PDF:

We're testing here in Mexico Birt (Liconsa, S.A. de C.V.) and is wonderful but we need a very important feature in our reports.

We need Birt detected when a line no longer fit on the page and therefore you print it on the next page.

If somebody can help us, appreciate it infinitely; only needed that to consider BIRT as our reporting tool ...

Please Help!!!!!!!!!!!!!
Comment 1 Gang Liu CLA 2008-06-25 02:44:56 EDT
had supported in 2.3.0
Comment 2 José Mejia CLA 2008-06-25 15:30:59 EDT
Created attachment 105833 [details]
PDF example to view the problem
Comment 3 José Mejia CLA 2008-06-25 15:35:33 EDT
Created attachment 105836 [details]
PDF example to view the problem

See the last row on page 2 as extending to page 3 in the text field DES_BIENSOLIC
Comment 4 José Mejia CLA 2008-06-25 15:43:59 EDT
(In reply to comment #0)
> Report problem in PDF:
> 
> We're testing here in Mexico Birt (Liconsa, S.A. de C.V.) and is wonderful but
> we need a very important feature in our reports.
> 
> We need Birt detected when a line no longer fit on the page and therefore you
> print it on the next page.
> 
> If somebody can help us, appreciate it infinitely; only needed that to consider
> BIRT as our reporting tool ...
> 
> Please Help!!!!!!!!!!!!!
> 

I just send an PDF example that I did with the newly released version 2.3 of Birt to see that the problem persists (See the last row on page 2 as extending to page 3 in the text field DES_BIENSOLIC).

I think that this problem was also mentioned in the newsgroup:

[news.eclipse.birt] Re: PDF pagination problem

    * From: Bruno Lowagie <bruno@xxxxxxxxxxx>
    * Date: Tue, 03 Apr 2007 13:15:00 +0200
    * Newsgroups: eclipse.birt
    * Organization: EclipseCorner
    * User-agent: Thunderbird 1.5.0.10 (Windows/20070221)

Klaus Henrik Ihlberg wrote:

    Klaus Henrik Ihlberg <khihlbe1@xxxxxxxxxxxxxxxxxx> wrote:

        I'm having a problem with PDF pagination in birt. I have a table with
        lots of rows and inside this table I have an another table with 2-20
        rows. When generating a PDF file of this it splits some of the table
        rows into two pages and this looks ugly. Is there a way to make BIRT
        do a page break after a table row if the next row doesn't fit into the
        page.


    Did a bit of investigating and apparently there is no way to do
    this. Is this feature planned on future releases of BIRT because this
    is quite important factor when printing PDF:s. IText that BIRT
    apparently uses for generating PDF:sshould support this.


As this is about iText, I want to clarify that there are different
ways to use iText.


When using high-level objects, we're talking about PdfPTable.
As described on p178-179 of the book 'iText in Action', the
PdfPTable object has three options:
(1) split the table BETWEEN rows (what you desire)
(2) cut a row in two parts (what you experience)
(3) omit a row that doesn't fit (I don't ever use this, but
    people asked for this and we implemented it).
(1) is the default option;
(2) can be set with setSplitLate(false);
(3) can be set with setSplitRows(false);


When using low level PDF functionality, it's up to the tool
(in this case Eclipse/BIRT) to decide if the content is written
on the current page, or if a new page is needed.


Any way: you have to take into account that some people
will WANT to have the row split in two parts, or even
throw away a row that doesn't fit the page. So an extra
parameter will be needed.


br,
Bruno
 
		
Comment 5 Gang Liu CLA 2008-06-25 23:18:10 EDT
Now Birt can not support page-break-inside: avoid, so the Row is split into two parts. Please refer to bug #202106 and bug #168019
Currently user can use the page-break-interval to control the page break, for example each page only contains 20 rows.
Comment 6 José Mejia CLA 2008-06-26 11:03:27 EDT
(In reply to comment #0)
> Report problem in PDF:
> 
> We're testing here in Mexico Birt (Liconsa, S.A. de C.V.) and is wonderful but
> we need a very important feature in our reports.
> 
> We need Birt detected when a line no longer fit on the page and therefore you
> print it on the next page.
> 
> If somebody can help us, appreciate it infinitely; only needed that to consider
> BIRT as our reporting tool ...
> 
> Please Help!!!!!!!!!!!!!
> 

OK but I can not use the feature page-break-interval, because the length of the text is variable; chance that it will take into account someday ... In my current tool exist a property which is called Page Protect:

Description  The Page Protect property indicates whether to try to keep the entire object and its contents on the same logical page.  Setting Page Protect to Yes means that if the contents of the object cannot fit on the current logical page, the object and all of its contents will be moved to the next logical page. 
Comment 7 Wei Yan CLA 2008-06-26 21:45:08 EDT
set wrong dependence
Comment 8 José Mejia CLA 2008-07-03 10:41:48 EDT
(In reply to comment #0)
> Report problem in PDF:
> 
> We're testing here in Mexico Birt (Liconsa, S.A. de C.V.) and is wonderful but
> we need a very important feature in our reports.
> 
> We need Birt detected when a line no longer fit on the page and therefore you
> print it on the next page.
> 
> If somebody can help us, appreciate it infinitely; only needed that to consider
> BIRT as our reporting tool ...
> 
> Please Help!!!!!!!!!!!!!
> 

Hi wei yan:
What does it mean set wrong dependence????

In JasperReports exist the property in the band detail "Split Allowed" that meets the required functionality....

Thank You!!!
Comment 9 Wei Yan CLA 2008-07-03 21:23:34 EDT
 ------- Comment  #7 From wei yan  2008-06-26 21:45:08 -0400  [reply] -------
set wrong dependence

I just set the bug depends to others wrongly, so I need remove the dependence. It is not related with this issue.

Comment 10 José Mejia CLA 2008-08-13 15:24:15 EDT
Version 2.5, we are talking about 2 years more or less. There will be another way to make it faster?
Comment 11 Gang Liu CLA 2009-03-19 23:42:41 EDT
had been supported in 2.5.0M6
User can set page-break-inside: avoid on rows.
Comment 12 Xiaodan Wang CLA 2009-04-16 04:48:40 EDT
Can set "page-break-inside: avoid" on rows to avoid page break in row.

Verified.