我明白CTMAN的意思啦。你可以放一个TPringDialog在Form上,用来设置报表打印
参数, 设置结果写到TQuickRep的PrinterSettings里就行了:
QuickRep1.Prepare;
PrintDialog1.MinPage := 1;
PrintDialog1.MaxPage := QuickRep1.PageNumber;
PrintDialog1.Options := PrintDialog1.Options + [poPageNums, poSelection];
if PrintDialog1.Execute then
begin
QuickRep1.PrinterSettings.FirstPage := PrintDialog1.FromPage;
QuickRep1.PrinterSettings.LastPage := PrintDialog1.ToPage;
QuickRep1.PrinterSettings.Copies := PrintDialog1.Copies;
QuickRep1.Print;
end;