⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 printunit.pas

📁 使用delphi语言
💻 PAS
字号:
unit printunit;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, QuickRpt, QRCtrls;

type
  Tprintform = class(TForm)
    QuickRep1: TQuickRep;
    DetailBand1: TQRBand;
    PageHeaderBand1: TQRBand;
    PageFooterBand1: TQRBand;
    QRLabel1: TQRLabel;
    QRLabel2: TQRLabel;
    QRLabel3: TQRLabel;
    QRShape1: TQRShape;
    TitleBand1: TQRBand;
    QRLabel4: TQRLabel;
    QRLabel5: TQRLabel;
    QRLabel6: TQRLabel;
    QRLabel7: TQRLabel;
    QRLabel8: TQRLabel;
    QRLabel9: TQRLabel;
    QRLabel10: TQRLabel;
    QRShape3: TQRShape;
    QRShape4: TQRShape;
    QRShape5: TQRShape;
    QRDBText1: TQRDBText;
    QRDBText2: TQRDBText;
    QRDBText3: TQRDBText;
    QRDBText4: TQRDBText;
    QRDBText5: TQRDBText;
    QRDBText6: TQRDBText;
    QRShape6: TQRShape;
    QRShape2: TQRShape;
    QRShape7: TQRShape;
    QRShape8: TQRShape;
    QRShape9: TQRShape;
    QRShape10: TQRShape;
    QRShape11: TQRShape;
    QRShape12: TQRShape;
    QRShape13: TQRShape;
    QRShape14: TQRShape;
    QRShape15: TQRShape;
    QRLabel11: TQRLabel;
    QRShape16: TQRShape;
    QRShape17: TQRShape;
    QuickRep2: TQuickRep;
    QRBand1: TQRBand;
    QRShape18: TQRShape;
    QRDBText9: TQRDBText;
    QRDBText10: TQRDBText;
    QRDBText11: TQRDBText;
    QRDBText12: TQRDBText;
    QRShape21: TQRShape;
    QRShape22: TQRShape;
    QRShape23: TQRShape;
    QRBand2: TQRBand;
    QRLabel12: TQRLabel;
    QRShape25: TQRShape;
    QRBand3: TQRBand;
    QRLabel16: TQRLabel;
    QRShape26: TQRShape;
    QRBand4: TQRBand;
    QRLabel19: TQRLabel;
    QRLabel20: TQRLabel;
    QRLabel21: TQRLabel;
    QRLabel22: TQRLabel;
    QRShape27: TQRShape;
    QRShape30: TQRShape;
    QRShape31: TQRShape;
    QRShape32: TQRShape;
    QRShape33: TQRShape;
    QRLabel15: TQRLabel;
    QRShape19: TQRShape;
    QRLabel13: TQRLabel;
    QuickRep3: TQuickRep;
    QRBand6: TQRBand;
    QRLabel14: TQRLabel;
    QRShape38: TQRShape;
    QRLabel23: TQRLabel;
    QRBand7: TQRBand;
    QRLabel24: TQRLabel;
    QRShape39: TQRShape;
    QRLabel17: TQRLabel;
    QRBand8: TQRBand;
    QRLabel26: TQRLabel;
    QRLabel27: TQRLabel;
    QRLabel28: TQRLabel;
    QRLabel29: TQRLabel;
    QRLabel30: TQRLabel;
    QRShape40: TQRShape;
    QRShape42: TQRShape;
    QRShape43: TQRShape;
    QRShape44: TQRShape;
    QRShape45: TQRShape;
    QRBand5: TQRBand;
    QRDBText8: TQRDBText;
    QRDBText13: TQRDBText;
    QRDBText14: TQRDBText;
    QRDBText15: TQRDBText;
    QRDBText16: TQRDBText;
    QRShape28: TQRShape;
    QRShape29: TQRShape;
    QRShape35: TQRShape;
    QRShape36: TQRShape;
    QRShape20: TQRShape;
    QRShape24: TQRShape;
    QRShape47: TQRShape;
    procedure QRLabel3Print(sender: TObject; var Value: String);
    procedure QRLabel10Print(sender: TObject; var Value: String);
    procedure QRLabel11Print(sender: TObject; var Value: String);
    procedure QRLabel13Print(sender: TObject; var Value: String);
    procedure QRLabel17Print(sender: TObject; var Value: String);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  printform: Tprintform;

implementation
  uses dmunit,cxmxunit,cxyeunit,cxdw_personunit,mainunit;
{$R *.dfm}

procedure Tprintform.QRLabel3Print(sender: TObject; var Value: String);
begin
  value:=dm.qcye.FieldByName('职工姓名').AsString;
end;

procedure Tprintform.QRLabel10Print(sender: TObject; var Value: String);
begin
  value:='打印时间:  '+datetostr(date);
end;

procedure Tprintform.QRLabel11Print(sender: TObject; var Value: String);
begin
  value:='制表人员:'+mainform.name ;
end;

procedure Tprintform.QRLabel13Print(sender: TObject; var Value: String);
begin
  value:='汇总年份: '+cxdw_personform.Label2.Caption ;
end;

procedure Tprintform.QRLabel17Print(sender: TObject; var Value: String);
begin
  if trim(cxyeform.Label2.Caption)='现在' then
    value:='截止:'+datetostr(date)
  else
    value:='截止:'+cxyeform.Label2.Caption ;
end;

procedure Tprintform.FormCreate(Sender: TObject);
begin
//dm.ye.Open ;
//cxyeform.a.Open ;
//cxdw_personform.ADODataSet1.Open ;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -