How to cancel a FastReport print job?

2019-07-26 03:55发布

How do I show a MessageBox when a print job is canceled in FastReport's Print Job Dialog?

2条回答
手持菜刀,她持情操
2楼-- · 2019-07-26 04:23
if frxReport1.Print then Showmessage('Aborted');
查看更多
疯言疯语
3楼-- · 2019-07-26 04:41

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.
查看更多
登录 后发表回答