| Summary: | [Improve Page Break Management] Page Break Properties Ignored | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Daniel Hakenjos <Daniel.Hakenjos> | ||||||||
| Component: | BIRT | Assignee: | Gang Liu <hustlg> | ||||||||
| Status: | VERIFIED FIXED | QA Contact: | Xiaodan Wang <xwang> | ||||||||
| Severity: | major | ||||||||||
| Priority: | P3 | CC: | bluesoldier, kgeis, wenfeng.fwd, wyan | ||||||||
| Version: | 2.1.1 | Keywords: | plan | ||||||||
| Target Milestone: | 2.5.0 M6 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | Autoed | ||||||||||
| Attachments: |
|
||||||||||
Created attachment 55651 [details]
Page break in header row
You can see a page break inside a header row
Created attachment 55652 [details]
Page break in header rows
You can see a page break in the header rows!
Created attachment 55653 [details]
Repeated Header without data
You can see that the header is repeated, but no data follows!
There ara three issues in this case: 1. Page break in a row. 2.1.1 do not support page-break-inside: avoid on rows. 2.2 support this feature. it had been fixed in 2.2. 2. Page break in header rows we need support page-break-after: avoid on rows. now it had not been supported yet. please refer to related bug:164083, 150243. 3. Repeated Header without data An empty row (table footer) exists on the last page. If removing the table footer, this page will dispear. (In reply to comment #4) Espacially point 2 is very important for us. We need control over page breaks because we have to put many tables with a not predefined Number of rows in our report. In 75% of all cases we have a page break in header rows. We cant go into production state with this behaviour. Is there a timeline to resolve this bug? E.g. a solution in one of the next Milestones? defer to future release schedule for 2.2.1 for point 2 in comment #4. it should be 2.3.0 M1 to add new feature. 2.2.1 is maintenance release. *** Bug 215736 has been marked as a duplicate of this bug. *** defer to next major milestone. defer to 2.5, resolved with other pagination issues. need more time to resolve those issues. Support page-break-before:avoid, page-break-after:avoid and page-break-inside:avoid. User can use page-break:avoid to control PDF pagination. Set page-break-before:avoid, page-break-after:avoid or page-break-inside:avoid on header row can avoid page break inside them. Verified in build (2.5.0.v20090313-0630). |
Hello, I'm repüorting with BIRT in Business stuff. For the reports I have to add dynamic tables via Design Engine API. In my tables I have multiple header rows. I want no page break in side the header rows! This is my code to generate the table: ArrayList<String> cols=new ArrayList<String>(); cols.add("NAME"); cols.add("INSTITUT"); cols.add("KONTONR"); cols.add("PRODUKT"); cols.add("SALDO"); cols.add("ISIN"); cols.add("BEMERKUNG"); TableHandle table = designFactory.newTableItem( "table", cols.size() + 1 ); table.setWidth("95%"); table.setProperty("marginLeft","12px"); table.setProperty("marginRight","32px"); table.setProperty("marginBottom","12px"); table.setStyleName("Tabelle"); table.setDataSet( designHandle.findDataSet( "ds" ) ); //Breiten der Spalten festlegen ((ColumnHandle) table.getColumns().get(0)).setProperty("width","2%"); ((ColumnHandle) table.getColumns().get(1)).setProperty("width","17%"); ((ColumnHandle) table.getColumns().get(2)).setProperty("width","18%"); ((ColumnHandle) table.getColumns().get(3)).setProperty("width","12%"); ((ColumnHandle) table.getColumns().get(4)).setProperty("width","17%"); ((ColumnHandle) table.getColumns().get(5)).setProperty("width","11%"); ((ColumnHandle) table.getColumns().get(6)).setProperty("width","10%"); ((ColumnHandle) table.getColumns().get(7)).setProperty("width","13%"); table.getHeader().add(designFactory.newTableRow(),0); table.getHeader().add(designFactory.newTableRow(),0); //Erste Header-Zeile RowHandle tableHeader1=(RowHandle) table.getHeader().get(0); CellHandle cellHandle=designFactory.newCell(); cellHandle.setProperty("backgroundColor","#FF0000"); tableHeader1.getCells().add(cellHandle); cellHandle=designFactory.newCell(); cellHandle.setColumnSpan(cols.size()); LabelHandle label1 = designFactory.newLabel("Dynamsiche Test-Tabelle"); label1.setText("Dynamsiche Test-Tabelle"); cellHandle.getContent( ).add( label1 ); cellHandle.setProperty("backgroundColor","#CCCCCC"); cellHandle.setProperty("textAlign","left"); cellHandle.setStyleName("Blockueberschrift"); cellHandle.setProperty("pageBreakInside","avoid"); cellHandle.setProperty("pageBreakAfter","avoid"); tableHeader1.getCells().add(cellHandle); //Zweite Header-Zeile RowHandle tableHeader2=(RowHandle) table.getHeader().get(1); cellHandle=designFactory.newCell(); cellHandle.setColumnSpan(cols.size()+1); tableHeader2.getCells().add(cellHandle); label1 = designFactory.newLabel("secondHeaderRow"); label1.setText(""); cellHandle.getContent().add(label1); cellHandle.setProperty("pageBreakBefore","avoid"); cellHandle.setProperty("pageBreakInside","avoid"); cellHandle.setProperty("pageBreakAfter","avoid"); PropertyHandle computedSet = table.getColumnBindings( ); ComputedColumn cs1 = null; for( int i=0; i < cols.size(); i++){ cs1 = StructureFactory.createComputedColumn(); cs1.setName((String)cols.get(i)); cs1.setExpression("dataSetRow[\"" + (String)cols.get(i) + "\"]"); computedSet.addItem(cs1); } // table header RowHandle tableheader = (RowHandle) table.getHeader().get(2); for( int i=0; i < cols.size(); i++){ label1 = designFactory.newLabel( (String)cols.get(i) ); label1.setText((String)cols.get(i)); if (i==0){ label1.setText("BETRAG / RATE IN €"); } CellHandle cell = (CellHandle) tableheader.getCells( ).get( i+1 ); cell.getContent( ).add( label1 ); cell.setStyleName("UeberschriftZelle"); cell.setProperty("pageBreakBefore","avoid"); cell.setProperty("pageBreakInside","avoid"); cell.setProperty("pageBreakAfter","avoid"); } // table detail RowHandle tabledetail = (RowHandle) table.getDetail( ).get( 0 ); for( int i=0; i < cols.size(); i++){ CellHandle cell = (CellHandle) tabledetail.getCells( ).get( i+1 ); DataItemHandle data = designFactory.newDataItem( "data_"+(String)cols.get(i) ); data.setResultSetColumn( (String)cols.get(i)); cell.getContent( ).add( data ); cell.setStyleName("Zelle"); cell.setProperty("pageBreakInside","avoid"); } As you can see, I set the properties for page break in the cells. If I set the properties to the row I get an exception! In the attachemnts you can see that the page break properties have no effect! For details, I'm using birt runtime 2.1.1 Thanks Daniel