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

Printing from TppDBArchiveReader

edited April 2012 in General
Hi

Report Builder 14.04 - Delphi 2007

I use the Archive reader to load an image of a previously printed image,
works fine.

If I then go to print the image using ppViewer1.Print the printer dialog is
displayed.

If I select Print - prints OK.

If I select the 'Cancel' button I still get a print - what could I be doing
wrong?

Any advice gratefully appreciated.

Regards

PLJ


procedure TwinInvRB.DBArchiveReaderPrintDialogClose(Sender: TObject);
begin
MyPrinter :=
TppPrinter(DBArchiveReader.PrintDialog.Printer).PrinterName;
MyCopies :=
TppPrinter(DBArchiveReader.PrintDialog.Printer).PrinterSetup.Copies;

end;

procedure TwinInvRB.DBArchiveReaderInitializePrinterSetup(Sender: TObject);
begin
DBArchiveReader.PrinterSetup.Copies := myCopies;
end;

procedure TwinInvRB.DBArchiveReaderCancel(Sender: TObject);
begin
CancelCopy := TRUE;
end;

procedure TwinInvRB.DBArchiveReaderBeforePrint(Sender: TObject);
begin
if DBArchiveReader.PrinterDevice <> nil then
DBArchiveReader.PrinterDevice.OnPageReceive :=
PageReceiveEvent;

//
TppViewer(DBArchiveReader.PreviewForm.Viewer).ScreenDevice.OnPageReceive :=
PageReceiveEvent;
end;

Comments

  • edited April 2012
    Hi Philip,

    Does this occur with the normal ArchiveReader as well? If you comment
    out all your code below, do you still get this behavior?

    As a test, try commenting out all event code and see if you still get
    this problem.

    Best Regards,

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