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

Report blank if printed twice

edited March 2013 in General
Hi,

RB14.08, Delphi 2009.

I'm finding that if I set a report up to start a new file on a group
break and call print (to archive file) I get the expected number of
archive files. If I immediately change the options to take off the
"NewFile" option on the group header and call print again (i.e. within
the same routine as the first print operation) I get a 0kb file and a
page count of 0. I have tried called Reset() between the two print
calls, but it makes no difference. Is there some other call I need to
make after the first print?

Thanks,

Steve Branley

Comments

  • edited March 2013
    Hi Steve,

    Please create a simple example demonstrating this behavior and send it
    in .zip format to support@digital-metaphors.com.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2013
    Further investigation has shown that it's not the act of printing twice
    that's the problem. Stripping out a custom preview part of our routine
    and instead going directly to print works as expected.


  • edited March 2013
    No, I can't seem to replicate this in a standalone application. What I
    have noticed is that it appears only to be a problem if print is called
    by clicking the "Print" button on a preview form.

    We have a class inheriting from ppPreview with an overridden Print()
    procedure. It's when the two print operations are called one after the
    other from this print procedure that we get problems. I've been trying
    to replicate it standalone but haven't yet succeeded. Do you have any
    suggestions without needing to see a sample app?

    Thanks

  • edited March 2013
    Hi Steve,

    If you are overriding the print button event, be sure you are performing
    a similar task that Viewer.Print does. By default when the Print button
    is pressed, Viewer.Print is called. When printing/exporting from the
    previewer, you need to at least be sure you disconnect the screen device
    before proceeding (as seen in the Viewer.Print routine). The rest is
    optional but also worth looking at.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.