我只需要为导出运行报告 (TQuickRep),无需打印或显示。Prepare 方法什么都不做。beforeprints 或 afterprints 事件不会触发。
前任。
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;