如何取消FastReport打印作业?

问题描述 投票:1回答:2

在FastReport打印作业对话框中取消打印作业时如何显示消息框?

delphi fastreport
2个回答
0
投票
if frxReport1.Print then Showmessage('Aborted');

0
投票

当frxReportPrint.Print返回false时,它是用户取消或打印错误。所以你需要检查Errors.Text是否为空,如:

if not frxReportPrint.Print then
  if frxReportPrint.Errors.Text = '' then
    UserCancel := true
  else
    Abort; // something wrong during printing.
© www.soinside.com 2019 - 2024. All rights reserved.