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

📄 unit2.pas

📁 pasa人力资源考勤管理系统
💻 PAS
字号:
unit Unit2;

interface

uses Windows, SysUtils, Messages, Classes, Graphics, Controls,
  StdCtrls, ExtCtrls, Forms, Quickrpt, QRCtrls, ADODB, Db, Series,
  TeEngine, TeeProcs, Chart, DBChart, QrTee;

type
  TQuickReport2 = class(TQuickRep)
    ADOgrade: TADODataSet;
    ADOyears: TADODataSet;
    TitleBand1: TQRBand;
    QRLabel1: TQRLabel;
    QRLabel2: TQRLabel;
    QRLabel3: TQRLabel;
    QRLabel4: TQRLabel;
    QRLabel5: TQRLabel;
    QRLabel6: TQRLabel;
    QRSysData1: TQRSysData;
    QRLabel7: TQRLabel;
    QRSysData2: TQRSysData;
    QRShape1: TQRShape;
    QRChart1: TQRChart;
    QRDBChart1: TQRDBChart;
    BarSeries1: TBarSeries;
    QRShape2: TQRShape;
    QRChart2: TQRChart;
    QRDBChart2: TQRDBChart;
    Series2: TBarSeries;
    procedure QuickRepAfterPrint(Sender: TObject);
    procedure QuickRepBeforePrint(Sender: TCustomQuickRep;
      var PrintReport: Boolean);
  private

  public

  end;

var
  QuickReport2: TQuickReport2;

implementation

uses main,personalreport,datamol;
{$R *.DFM}

procedure TQuickReport2.QuickRepAfterPrint(Sender: TObject);
begin

  adograde.close;
  adoyears.close;

end;

procedure TQuickReport2.QuickRepBeforePrint(Sender: TCustomQuickRep;
  var PrintReport: Boolean);
var fmat1:string;
begin
  if fmat='/' then
    fmat1:='    /  /  ';
  if fmat='-' then
    fmat1:='    -  -  ';
  if (formpersonalreport.MaskEdit1.text=fmat1) or (formpersonalreport.MaskEdit2.text=fmat1) then
    begin
      Application.MessageBox('日期输入不完整!','Error',mb_ok+mb_iconerror);
      exit;
    end;

  adograde.close;
  adoyears.close;
 adograde.CommandText:='select degreename,count(workno) from per24010 where leave=0 and indate between convert(datetime,'''+formpersonalreport.maskedit1.Text+''') and convert(datetime,'''+formpersonalreport.maskedit2.Text+''') group by degreename';
  adoyears.CommandText:='select ''半年以下'' as name1,count(workno) as num1 from per24010 where leave=0 and years<0.6  and years>=0 and  indate between convert(datetime,'''+formpersonalreport.maskedit1.Text+''') and convert(datetime,'''+formpersonalreport.maskedit2.Text+''') union '+
  'select ''半年至一年'' as name1,count(workno) from per24010 where leave=0 and years>=0.6 and years<=1.2 and  indate between convert(datetime,'''+formpersonalreport.maskedit1.Text+''') and convert(datetime,'''+formpersonalreport.maskedit2.Text+''') union  '+
'select ''一年以上至二年'' as name1,count(workno) from per24010 where  leave=0 and years>1.2 and years<=2.4 and  indate between convert(datetime,'''+formpersonalreport.maskedit1.Text+''') and convert(datetime,'''+formpersonalreport.maskedit2.Text+''') union   '+
'select ''二年以上至五年'' as name1,count(workno) from per24010 where leave=0 and years>2.4 and years<=6.0 and  indate between convert(datetime,'''+formpersonalreport.maskedit1.Text+''') and convert(datetime,'''+formpersonalreport.maskedit2.Text+''') union   '+
'select ''五年以上到十年'' as name1,count(workno) from per24010 where leave=0 and years>6.0 and years<=12.0 and  indate between convert(datetime,'''+formpersonalreport.maskedit1.Text+''') and convert(datetime,'''+formpersonalreport.maskedit2.Text+''') union  '+
'select ''十年以上'' as name1,count(workno) from per24010 where leave=0 and years>12.0';


  adograde.Open;
  adoyears.Open;

  QRLabel2.caption:=companyname1;
  qrlabel5.caption:=pubworkname;
end;

end.

⌨️ 快捷键说明

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