fastreport 怎么判断打印完成

2025-03-22 20:59:04
推荐回答(1个)
回答1:

  1. 在程序里新增一个预览窗体"FrmRepView"在该窗体上拖放"frxPreview1"(供打印时调用)
    2.在预览窗体中添加功能按钮(如:打开,保存,打印.....)
    3.代码
    在打印按钮的单击事件中:
      PrintFlag := 1;//打印标识
      frxPreview1.Print;
    调用方法:
      s := 'FilePath';
      frxReport1.LoadFromFile(s);
       if FrmRepView=nil then FrmRepView:=TFrmRepView.Create(nil);
      frxReport1.Preview := FrmRepView.frxPreview1;
      if frxReport1.PrepareReport then
      begin
        frxReport1.ShowPreparedReport;
        FrmRepView.ShowModal;
      end;

    你可以试试finereport,方便多了