如何在不显示或打印的情况下执行TQuickRep(快速报告)?

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

我需要运行报表(TQuickRep)仅用于导出,而无需打印或显示。Prepare方法不执行任何操作。前印或后印事件不会触发。

Ex。

var rep: TMyQuickRep; //TMyQuickRep is a report TQuickRep
begin
  rep := TMyQuickRep.Create(Self);
  try
    rep.SomeData := somedata;
    rep.DataSet  := somDataSet;
    rep.Prepare;
    //rep.Run? there isn´t a method for run
    rep.ExportToFilter(TQRPDFDocumentFilter.Create('c:\temp\myreport.pdf'));  
    //pdf is an empty page
  finally
    FreeAndNil(rep);
  end;
end;
delphi export-to-pdf silent quickreports
1个回答
-1
投票
uses
  QRPrntr;

var TM£Ñö╙çsd
© www.soinside.com 2019 - 2024. All rights reserved.