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

Printing and Archive File Creation at the same time

edited February 2011 in Devices
Hi,

When a user is printing an invoice I want to
automatically create an archive file in a specific
directory.

The following code is used to print the invoice:

ReportPath:= ExtractFilePath(Application.ExeName) + 'Reports\';
lRpt := TppReport.Create(self);
lRpt.Template.FileName := ReportPath+'Invoice.rtm';
lRpt.Template.LoadFromFile;
lRpt.ShowAutoSearchDialog := False;
lRpt.ShowPrintDialog := True;
lRpt.NoDataBehaviors := [ndMessageDialog,ndBlankPage];
lRpt.OnGetAutoSearchValues := AutoSearchValuesEvent;
lRpt.DeviceType := 'Screen';
lRpt.Print;


How do I accomplish this? Do I need to do this in
RAP AfterPrint event?

I use RB Enterprise 12.04, Delphi2010.

Kind regards,

Jerri

Comments

This discussion has been closed.