Delphi 3 中 QReport 如何设定打印范围,就像Word中一样.(200分)

C

cmtan

Unregistered / Unconfirmed
GUEST, unregistred user!
如题.

十万火急,谢谢!

 
S

Sunset

Unregistered / Unconfirmed
GUEST, unregistred user!
用 QuickRep.PrinterSetup 就可以设置打印范围了

 
C

cmtan

Unregistered / Unconfirmed
GUEST, unregistred user!
能否在详细点,我不想用打印预览里的PrintSetup.
 

方栩

Unregistered / Unconfirmed
GUEST, unregistred user!
去DELPHI深度历险 http://vcl.vclxx.com/DELPHIGB/DEFAULT.HTM
看看,应该有控件适合你
 
H

huizhang

Unregistered / Unconfirmed
GUEST, unregistred user!
我记得 TQuickRep 控件有一个 page 属性专门用来设置打印范围、边界。
 
S

Sunset

Unregistered / Unconfirmed
GUEST, unregistred user!
我明白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;
 

Similar threads

顶部