Report blank if printed twice
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
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
This discussion has been closed.
Comments
Please create a simple example demonstrating this behavior and send it
in .zip format to support@digital-metaphors.com.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
that's the problem. Stripping out a custom preview part of our routine
and instead going directly to print works as expected.
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
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.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com