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

Printing problem

edited March 2003 in General
Hello NG,

I have a report, wich sould be printed 5 times.

I do following:

for i := 0 to 4 do
begin
if i > 0 then
aktReport.ShowPrintDialog := false;
aktReport.Reset;
aktReport.DeviceType := DeviceType;
aktReport.Print;
kopiecounter := kopiecounter + 1;
end

In the OnBeforePrint-Event of a Header, I change a caption depending on
the kopiecounter variable.


In the first loop (i = 0) then PrintDialog is shown. In the following
loops the Dialog is not shown.

And now my problem:
If I change some options in the printdialog (for example the printer),
only the first print is correct, all the other prints are printed on the
default device.

How can resolve this, that all prints use the same printingoptions like
the first print?

regards,
Markus

Comments

  • edited March 2003
    Markus,

    Check to see that you have the Report.SavePrinterSetup property to true.
    This will save the printer setup for the life of the report so every time
    you call print, it will use the original printer setup you assigned from the
    print dialog. This only works for the TppPrinterSetup. To save the
    DevMode Structure configured specifically for your printer driver, please
    see this demo.

    http://www.digital-metaphors.com/tips/SavePrinterDevMode.zip

    --
    Best Regards,

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