Detecting Whether PrintDialog Cancel

TECH TIP: Detecting Whether PrintDialog’sĀ Cancel Button Was Selected

When the print dialog is displayed to the user, you can determine whether the Cancel button was selected by using theĀ  Report.OnPrintDialogClose event.

Example:

procedure TForm1.ppReport1PrintDialogClose(Sender: TObject);
begin

  if ppReport1.PrintDialog.ModalResult = mrCancel then
    ShowMessage('Use chose to cancel the print request');

end;