请教:while not Frm_report.ADOQuery1.eof do
begin
i:=i+1;
if i<>1 then
begin
Frm_report.QRLabel1.Enabled:=false; //标题
end;
Frm_report.QryReport.active:=false;
Frm_report.QryReport.Parameters[0].Value:=frm_main.Lbljyp.Caption;
Frm_report.QryReport.Parameters[1].Value:=Frm_report.ADOQuery1.FieldByName('销售小票号').AsString;
Frm_report.QryReport.active:=true;
//showmessage(QryReport.SQL.Text);
//showmessage(frm_main.Lbljyp.Caption);
Frm_report.QRLabel11.Caption:=Frm_main.DBEditEh10.Text;
Frm_report.QRLabel12.Caption:=Frm_report.QryReport.FieldByName('商户编码').AsString;
Frm_report.QRLabel19.Caption:=Frm_report.QryReport.FieldByName('销售小票号').AsString;
if i<>Frm_report.ADOQuery1.recordcount then
begin
//Frm_report.QuickRep1.PreviewModal;
Frm_report.QuickRep1.Print;------这里换页了。
end;
Frm_report.Adoquery1.next;
end;
Frm_report.zlQry.Active:=false;
Frm_report.zlQry.Parameters[0].Value:=Lbljyp.Caption;//Frm_report.ADOQuery1.FieldByName('销售小票号').AsString;;
Frm_report.zlQry.Active:=true;
Frm_report.QRLabel20.Enabled:=true;//总折让
Frm_report.QRLabel24.Enabled:=true;
Frm_report.QRLabel24.Caption:=Frm_report.zlQry.FieldByName('总折扣').AsString;;
Frm_report.QRLabel21.Enabled:=true;//总应付
Frm_report.QRLabel26.Enabled:=true;
Frm_report.QRLabel26.Caption:=Frm_report.zlQry.FieldByName('交易金额').AsString;;
Frm_report.QRLabel22.Enabled:=true;//收入现金
Frm_report.QRLabel25.Enabled:=true;
Frm_report.QRLabel25.Caption:=Frm_report.fkQry.FieldByName('实付金额').AsString;
Frm_report.QRLabel23.Enabled:=true;//找零
Frm_report.QRLabel27.Enabled:=true;
Frm_report.QRLabel27.Caption:=Frm_report.zlQry.FieldByName('找零').AsString;;
Frm_report.QRLabel18.Enabled:=true; //多谢惠顾
//Frm_report.QuickRep1.PreviewModal;
Frm_report.QuickRep1.Print;-----------------换页了。我想实现的是在一张纸上打印这个报表,怎么做?谢谢!
begin
i:=i+1;
if i<>1 then
begin
Frm_report.QRLabel1.Enabled:=false; //标题
end;
Frm_report.QryReport.active:=false;
Frm_report.QryReport.Parameters[0].Value:=frm_main.Lbljyp.Caption;
Frm_report.QryReport.Parameters[1].Value:=Frm_report.ADOQuery1.FieldByName('销售小票号').AsString;
Frm_report.QryReport.active:=true;
//showmessage(QryReport.SQL.Text);
//showmessage(frm_main.Lbljyp.Caption);
Frm_report.QRLabel11.Caption:=Frm_main.DBEditEh10.Text;
Frm_report.QRLabel12.Caption:=Frm_report.QryReport.FieldByName('商户编码').AsString;
Frm_report.QRLabel19.Caption:=Frm_report.QryReport.FieldByName('销售小票号').AsString;
if i<>Frm_report.ADOQuery1.recordcount then
begin
//Frm_report.QuickRep1.PreviewModal;
Frm_report.QuickRep1.Print;------这里换页了。
end;
Frm_report.Adoquery1.next;
end;
Frm_report.zlQry.Active:=false;
Frm_report.zlQry.Parameters[0].Value:=Lbljyp.Caption;//Frm_report.ADOQuery1.FieldByName('销售小票号').AsString;;
Frm_report.zlQry.Active:=true;
Frm_report.QRLabel20.Enabled:=true;//总折让
Frm_report.QRLabel24.Enabled:=true;
Frm_report.QRLabel24.Caption:=Frm_report.zlQry.FieldByName('总折扣').AsString;;
Frm_report.QRLabel21.Enabled:=true;//总应付
Frm_report.QRLabel26.Enabled:=true;
Frm_report.QRLabel26.Caption:=Frm_report.zlQry.FieldByName('交易金额').AsString;;
Frm_report.QRLabel22.Enabled:=true;//收入现金
Frm_report.QRLabel25.Enabled:=true;
Frm_report.QRLabel25.Caption:=Frm_report.fkQry.FieldByName('实付金额').AsString;
Frm_report.QRLabel23.Enabled:=true;//找零
Frm_report.QRLabel27.Enabled:=true;
Frm_report.QRLabel27.Caption:=Frm_report.zlQry.FieldByName('找零').AsString;;
Frm_report.QRLabel18.Enabled:=true; //多谢惠顾
//Frm_report.QuickRep1.PreviewModal;
Frm_report.QuickRep1.Print;-----------------换页了。我想实现的是在一张纸上打印这个报表,怎么做?谢谢!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货