补充说明:代码如下,在QuickRep中设纸张为Custom Length=138.0mm,Width=215.0mm.
当用户选择半张打印时打印的实际内容为半张(8行记录),但纵向放达占满一张高27.6CM
的张,当用户选择整张打印时,不会放大。
with prtordfrmdo
begin
if radiogroup2.ItemIndex =0 then
(用户选择半张打印时)
begin
quickrep1.Page.Length :=138.0;
quickrep1.Page.Width :=215.0;
end
else
begin
(用户选择整张打印时)
quickrep1.Page.Length :=276.0;
quickrep1.Page.Width :=215.0;
end;
with adoquery1do
begin
if active then
close;
parameters.parambyname('orderno').value:=trim(edit2.text);
try
open;
prtordfrm.QRExpr2.Mask:=trim(adoquery1.fieldbyname('currency').value)+'#,##0.00';
except
raise;
exit;
end;
end;
if not adoquery2.Active then
adoquery2.active:=true;
try
quickrep1.Prepare;
prtordfrm.qrlabel15.caption:='of '+inttostr(quickrep1.QRPrinter.PageCount);
quickrep1.preview;
finally
prtordfrm.close;
prtordfrm:=nil;
end;