Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Previews Fine, Prints Blank Pages

edited February 2002 in General
I've just upgraded from 5.1 or 5.2 to 6.03. Many of my reports print fine
and preview fine, but print 1000s of blank pages when I try to print from
the preview screen.

I've looked closely at one of these reports. It does not have subreports.
AutoStop = false, and the report's pipeline is assigned. It has a detail
band with no memos or stretching components, but there are several groups
with group headers on the detail band. I've tried setting
detailband.PrintHeight to phDynamic, but that did not help. I close and
open all my queries in the BeforePrint event. Is that bad?

Thanks,
George

Comments

  • edited February 2002
    The Report.BeforePrint is going to fire when you preview, and then again
    when you print from the preview. The report is regenerated for the printer,
    eventhough you've previewed it on the screen. There is a Report.CachePages
    property which will cache all pages that have been previewed. Make sure
    that the datapipeline is connected to the report. The query for the report
    should be closed before running the report. When the report goes to print,
    the report's datapipeline will open the query and close it when the report
    is finished.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited February 2002
    OK - I moved my query closing, sql.text setting, and opening into another
    public procedure in the form, and it looks like it is working properly now.

    This product really needs to be smart enough to detect and prevent these
    infinite loop conditions, even if the programmer set something incorrectly.
    By my count, there are at least 6 different ways that this can happen.
    Maybe you could give run-time error messages like "Report.DataPipeline not
    set correctly" or "Dataset open before Report.BeforePrint" and then just
    stop the report. That would certainly help us in our debugging process,
    which for me involved consulting this newsgroup, testing your suggestions
    one by one, and having to delete items from the printer queue and turn the
    printer off each time one of your suggestions did not work.

    Thanks,
    George

  • edited February 2002
    Glad to hear it is working. Thankyou, for the suggestions.


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.