Home
Analytics
Unneccessary last empty page
GoranG
Interesting thing.
Once I have built my reports, I realised that the PDF produces additional, empty page. With header. So the paper is wasted. And my reputation :-)
Forget the reputation part.
How can I avoid this? For better picture let me explain that there are two pages used, and the third page is the empty one. The second page has 9 lines only, and is far from being filled. So the page brakes comes from...no idea.
A bit structural info: On first page I have several "dynamic texts". Than I inserted a grid that contains several -one line only- tables (still learning how to do this better, but that is another topic).
After that I have another grid with a lot of -one line only- tables. And this one (the grid) starts on first page (about 2 thirds of the page is used by this grid), and last 9 lines, still part of this grid, are on the second page.
Then comes a lot of nothing, then new page and just a logo which is defined on master page.
Suggestions, please.
G
Find more posts tagged with
Comments
mwilliams
Hi G,
Can you attach your report design? I'll take a look to see if I see something obvious. Do you have any page breaks set up at all? Are you hiding details of any tables? Anything like that? Also, what is your BIRT version?
GoranG
Hi, mwilliams.
Report is attached. Birt version is 2.5.2.
Some of the tables are hidden, yes.
Thanks in advance.
cheers,
G
mwilliams
G,
I'm not able to open that report for some reason. Not getting a version error. It just won't open the file at all. Not sure what the deal is there. Are these tables that you're hiding used for anything? Or are they hidden based on a parameter value?
If you can reproduce the problem with a simple report using the sample database, that'd be great!
GoranG
Hi.
No idea what the problem could be. It could be that our library is missing, or DB connection, or just bad karma, or whatever.
Anyway, I've redone the report. Basically, you won't see any values here, but I guess that is not important. What I removed from original report are values in each line - but that doesn't effect the empty page that is printed.
You will probably have comments on overall design too. Please, feel free to suggest improvements, since I am only learning how to make this reports. And as usual, we are close to the project end-phase, and the time pressure doesn't allow me to *really* learn it.
Thanks,
G
Later edit: the input parameter can by of any value. doesn't matter what you enter.
mwilliams
G,
The height that was set for your grid was too tall. That's why you were ending up with a blank second page. If you make it small enough, the second page goes away. The grid height doesn't need to be set. It will adjust itself. As for the design, you don't need to put each label in the lower grid into a table, unless you're attaching that table to a dataSet and bringing in data. You could just use grid rows or just stack the labels in the single grid row to keep them one below the other. Let me know if you have questions.
GoranG
mwilliams,
thank you for the reply. It doesn't work though. I have removed the defined height stepwise for each of the element in my report, yet I always get an empty page.
When I surrounded the last grid (id = 257) with borders, I noticed that the bottom line is put to the second page. So tried to convince the BIRT not to do it. The height, vertical alignment, all <i>could be</i> and all <i>shouldn't matter</i> things I could think of. With no success. Even removing several of the tables from the grid didn't help. And then resizing the grid. Changing the height to 100%. Removing the height (left it empty). There's always this last, empty, unneccessary page.
Then I decided to try something else: to create a grid with 28 rows, copy all the tables in these rows and trying to resize it all in once. I cannot believe how this (doesn't) work. Resizing the elements in BIRT...well, it is obvious this tool was NOT meant to help with design. Discouraging.
On the other hand, what I did achieve: the last page is not empty anymore. It has two entries, not alligned at all (even though they were created as copies of previous tables...)
Sweet.
GoranG
After couple of hours I've found a way - the grid I had contained only one cell (1x1).
Obviously the page-breaking is a problem (which is now clear to me, but had to learn it the "hard way").
So I have entered new grid, one column, n rows, copied (drag&drop works!) existing tables to new grid and removed the old grid. Page-breaking works.
Of course, aligning the tables etc. had to be done manualy. A bit of cursing, a bit of mistakes, some corrections, but I have it now.
About not having that many tables: I'll follow your advice, mwillams, when building the next report.
thanks for your effort.
G
mwilliams
G,
When I removed the height, it didn't work for me either, but when I reset it to a size that would fit within the page, it worked correctly.
tfield
Michael,
I am now having this exact same problem, although my blank last page is printing the Master Page information. any advice?
Tina
mwilliams
Hi Tina,
Do you have a grouping in your report? If so, are you setting a page break after to "always"? If so, try using "always excluding last". If this isn't it, can you recreate your issue with the sample database? If not, can you attach your report and I'll see if I can notice anything from it. Also, let me know your BIRT version? Thanks.
tfield
Michael,
Yes, I have a group in my report. I am not setting any page breaks other than defaults to "Auto". I tried the "always excluding last". That didn't get rid of the extra page AND I don't want to break after each group. I'm using version 2.5.2. Report attached.
Tina
mwilliams
Tina,
Since I won't be able to run your report, does the data on the next to last page (the one before the empty one) go almost all the way or all the way to the bottom?
tfield
Michael,
Your so fast with your responses. I really appreciate it.
It varies. It doesn't matter the length of the page prior to the empty one. The last time I ran the report it went half way.
Tina
mwilliams
Is there any way you can recreate the issue with the sample database and attach it in here? Or does it only happen with this report with your data?
tfield
I've done other reports and this is the only one it's happening with. I've tried everything except starting over. I removed my group, changed the table page breaks, changed the table page break interval, modified the master page. When I remove all the information from the master page, I still get a blank last page, with the Master Page in, I get Header/Footer on the last page. With the group in, I changed the page break info to "Always Excluding Last".
mwilliams
Hmmm. I'll take a look at your report design and see if there's anything that I think could make this happen and let you know. One other possibility I can think of without looking is that maybe you have a width set on some item in your report and that because of padding or just an oversizing, it causes a "page break" even though no data actually flows onto the "overflow" page.
tfield
Michael,
I GOT IT!!!! My outer grid was too long. I just needed a weekend off. Thanks for your help.
Tina
mwilliams
That was one of the things I thought it might be! Glad to help. Let us know whenever you have questions!
Koti
<p>Hi,</p>
<p> </p>
<p>Is there a way to add an empty page between each copy of the report?</p>
<p> </p>
<p>I have report which expects XML file as data source which i was sending same piece of XML being sent as twice under a root node. And my report generates 2 pages with Copy in header being set from my input XML.</p>
<p> </p>
<p>Is there a way to insert a blank page between the 2 copies? This is due to printers having both side printing enabled and in this case the 2 copies gets printed on the same page.</p>
<p> </p>
<p>Regards,</p>
<p>Koti</p>
Clement Wong
<p>Koti,</p>
<p> </p>
<p><em>Is there a way to add an empty page between each copy of the report?</em></p>
<p> </p>
<p>Without looking at your design, or what version of BIRT you are using, what do you mean by "each copy of the report"? Do you mean that you have two tables (or grids), and each table (or grid) generates a single page?</p>
<p> </p>
<p>If so, then for the first table/grid, you can simply change the <em>Page Break > After</em> to <strong>Always</strong>. Next insert a Label Report Item between the two tables/grids. Change the Label Report Item's <em>Page Break > After</em> to <strong>Always</strong>. Now you will have a blank page between your "copies" or tables/grids.</p>
<p> </p>
<p>Next time, please start a new a new thread.</p>