AfterPrint or OnPrintingComplete
I have tried both the AfterPrint and OnPrintingComplete events to try to
signal when printing is complete.
I want to do something when these events are fired.
Here is the code leading up to the Print method:
Treptemp.Close;
Treptemp.Filter := 'REP_NAME='+''''+'Invoicing'+'''';
Treptemp.Filtered := True;
Rinvoicing.Template.DatabaseSettings.Name := 'Invoicing';
Rinvoicing.Template.LoadFromDatabase;
Rinvoicing.DeviceType := 'Printer';
Rinvoicing.Print;
Treptemp.Close;
I have attached code to the OnPrintingComplete event handler as well as the
AfterPrint event handler: I have yet to even see the ShowMessage.
procedure TFRMinvoicing_main.RinvoicingPrintingComplete(Sender: TObject);
begin
ShowMessage('Made It To Here!');
case RGhow.ItemIndex of
0 : begin
//do something here.
end;
end;
end;
Any suggestions? D5, RBent602
Bo Manry
bom@medmanagementllc.com
signal when printing is complete.
I want to do something when these events are fired.
Here is the code leading up to the Print method:
Treptemp.Close;
Treptemp.Filter := 'REP_NAME='+''''+'Invoicing'+'''';
Treptemp.Filtered := True;
Rinvoicing.Template.DatabaseSettings.Name := 'Invoicing';
Rinvoicing.Template.LoadFromDatabase;
Rinvoicing.DeviceType := 'Printer';
Rinvoicing.Print;
Treptemp.Close;
I have attached code to the OnPrintingComplete event handler as well as the
AfterPrint event handler: I have yet to even see the ShowMessage.
procedure TFRMinvoicing_main.RinvoicingPrintingComplete(Sender: TObject);
begin
ShowMessage('Made It To Here!');
case RGhow.ItemIndex of
0 : begin
//do something here.
end;
end;
end;
Any suggestions? D5, RBent602
Bo Manry
bom@medmanagementllc.com
This discussion has been closed.
Comments
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
Rinvoicing.OnPrintingComplete := RinvoicingPrintingComplete;
This did not seem to work. However, I assigned the AfterPrint event like
this
Rinvoicing.AfterPrint := RinvoicingPrintingComplete;
This worked fine. Is there something about the OnPrintingComplete that does
not work?
Thanks,
Bo
Use AfterPrint instead.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com