How do I show a MessageBox when a print job is canceled in FastReport's Print Job Dialog?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
if frxReport1.Print then Showmessage('Aborted');
回答2:
When frxReportPrint.Print returns false, it is either user cancel or error in printing. So you need to check Errors.Text is empty or not, like:
if not frxReportPrint.Print then
if frxReportPrint.Errors.Text = '' then
UserCancel := true
else
Abort; // something wrong during printing.