我需要运行报表(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;
uses
QRPrntr;
var TM£Ñö╙çsd