Mysterious blank pages

Sunday 10 April 2011 @ 3:14 pm

I am used to helping users troubleshoot blank pages in their Crystal Reports.  The usual culprits are blank report footers or group footers that need to be suppressed.  Occasionally there is a page break that isn’t put in correctly.  But I recently had one that I had not seen before.  In preview the report showed 3 pages.   But if the report was printed there were double the number of pages, with a blank page between each printed page.  The same doubling would happen when it was exported to a PDF.

What I found was an image object (an OLE object) that was just a hair wider than the printable area on the page.  In preview this would show as a white space to the right of the printed page, which was easy to overlook.  It also didn’t affect the page count.   But when printed or exported to PDF it would alternate printed and blank pages and double the page count.  Once the OLE object was moved to within the printable area the blank pages went away.

This surprised me because normal CR objects that have a static size (fields, charts, boxes, etc) are just truncated if they stretch to the right too far.  The only object that I knew of that could generate these pages to the right were cross-tabs,  because their width is dynamic.   So if you have a mysterious extra page in your report this is one more thing to check.

 








3 Responses to 'Mysterious blank pages'

  1. MHurwood - April 11th, 2011 at 1:46 am

    Actually, you can have this happen with lots of objects. I had a terrible time tracking this down once where a horizonal line was just that fraction too wide and was causing exttra pages to be printed with a single small dot on them.

    But you can also use this “feature” to your advantage. I had a customer want to print some “Terms and Conditions” on the back of every page of their invoices. I created a Page Header section, set to underlay the following sections, then put a sub-report into that section. In the sub-report I then had a single huge Details section that had all the text they required. At this point if you printed things you got the Invoice and T&Cs all ontop of the other, sort of like a watermark. The final tick was to drag the sub-report right over to the righ hand side of the report, so that 99% of it was beyond the right-hand margin. Presto! Extra pages printed out between all the regular pages with the Terms and Conditions! So long as the printer is set to duplex pages automatically, it’s perfect!

  2. Ken Hamady - April 11th, 2011 at 11:36 am

    Thanks, that is a novel approach. I have never noticed a subreport doing that before. Even in my tests this morning I got some subreports to generate the page, and some to truncate. None of them showed the extra space in preview like I saw with the OLE object, but they did generate the page when sent to PDF and (I assume) to the printer.

    But you also mentioned lines, and I could not get lines or boxes to generate an extra page at all. Are you using CR 2008 or another version?

  3. MHurwood - April 13th, 2011 at 7:58 am

    You’re right… with CR2008 I can’t get lines to generate extra pages either any more. And indeed, it’s hard to get them to “hang over the margin edge” too. (I had to adjust a page margin after placing an object on the right hand side.)
    But it’s been a few years since I last saw the problem, and in that time I’ve used every release since v8.0, so this might just be a case of a bug being cleaned up over the years.


Leave a Reply

Recrystallize Pro