Jim Garrison
Jim Garrison

Reputation: 86744

BIRT produces empty first page

After upgrading BIRT from version 2.3.2 to 2.6.1, some reports have started producing empty first pages. I've checked the source XML of the rptdesign and the referenced rptlibrary and verified that ALL settings of page break properties are set to "auto". I.e. there are no forced page breaks anywhere in the report definition. The first page contains the master page header/footer items but no data.

Being a relative newbie to BIRT I'm not sure where to go next to solve (or even debug) this problem. My Google-fu turns up some old BIRT bugs (2.1 timeframe) relating to empty first pages but they were resolved long ago.

Can someone suggest how debug this?

First Page

First Page

Second Page

Second Page

Upvotes: 1

Views: 2668

Answers (2)

Matthias Gwiozda
Matthias Gwiozda

Reputation: 595

This happened for us when we were including svg - images in Birt. Removing them in the XML - document fixed the Problem. Interestingly this only happens with specific svg - images and not with all of them...

Upvotes: 0

Jim Garrison
Jim Garrison

Reputation: 86744

I have identified the source of the problem. When this report was originally designed (long before my time) a grid was used to effect some padding around the outside of the content. At the top level of the design (in the body) is a 3x3 grid with skinny top and bottom rows and left and right columns, with all content going in the center cell.

body
   grid
      column1 width=2%
      column2 width=96%
      column3 width=2%
      row1 (empty) 
      row2
         table with all report content
      row3 (empty)

All the border cells are empty, and if I completely remove the grid and place the content table in the body directly, there is no initial page break.

body
    table with all report content

So the bug appears to occur if the content, which is larger than a single output page, is inside a grid. In this case, the normal suppression of the page break before the first page does not seem to function.

It's not clear if this is a bug or a design decision, so I have asked on the Eclipse community forums if this behavior is expected. I will update this answer when I get a definitive reply.

EDIT: Looks like a BIRT Bug

EDIT: For us, an acceptable workaround is to simply delete the first row in the grid, which consisted of only empty cells anyway. If the too-large section occurs in the (now) first row, the spurious page-break disappears.

Upvotes: 1

Related Questions