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

📄 manchangereport.pas

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

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Mask, ExtCtrls, ppDB, ppDBPipe, ppBands, ppCtrls, ppPrnabl,
  ppClass, ppCache, ppComm, ppRelatv, ppProd, ppReport, ppVar, Db, ADODB;

type
  Treportformanchange = class(TForm)
    Label1: TLabel;
    RadioGroup1: TRadioGroup;
    Button1: TButton;
    Button2: TButton;
    MaskEdit1: TMaskEdit;
    MaskEdit2: TMaskEdit;
    Edit1: TEdit;
    ppReport1: TppReport;
    ppHeaderBand1: TppHeaderBand;
    ppLabel3: TppLabel;
    ppLabel4: TppLabel;
    ppLabel5: TppLabel;
    ppLabel8: TppLabel;
    ppLabel9: TppLabel;
    ppLabel11: TppLabel;
    ppLabel13: TppLabel;
    ppLabel14: TppLabel;
    ppLabel15: TppLabel;
    ppLabel16: TppLabel;
    ppLabel17: TppLabel;
    ppDetailBand1: TppDetailBand;
    ppDBText1: TppDBText;
    ppDBText2: TppDBText;
    ppDBText3: TppDBText;
    ppDBText6: TppDBText;
    ppDBText7: TppDBText;
    ppDBText9: TppDBText;
    ppDBText11: TppDBText;
    ppDBText12: TppDBText;
    ppDBText13: TppDBText;
    ppDBText14: TppDBText;
    ppFooterBand1: TppFooterBand;
    ppDBPipeline1: TppDBPipeline;
    ppLabel1: TppLabel;
    ppLabel18: TppLabel;
    ppLabel19: TppLabel;
    ppLine1: TppLine;
    ppDBText16: TppDBText;
    ppLabel20: TppLabel;
    ppDBText17: TppDBText;
    ppLabel22: TppLabel;
    ppLabel23: TppLabel;
    ppLabel24: TppLabel;
    ppSystemVariable1: TppSystemVariable;
    ppLabel25: TppLabel;
    ppSystemVariable2: TppSystemVariable;
    DataSource1: TDataSource;
    ADODataSet1: TADODataSet;
    ppLine2: TppLine;
    ADODataSet1workno: TStringField;
    ADODataSet1cardno: TStringField;
    ADODataSet1name: TStringField;
    ADODataSet1sexname: TStringField;
    ADODataSet1deptno: TStringField;
    ADODataSet1dept: TStringField;
    ADODataSet1prof: TStringField;
    ADODataSet1scheno: TStringField;
    ADODataSet1dothing: TStringField;
    ADODataSet1dayormon: TBooleanField;
    ADODataSet1mankind: TStringField;
    ADODataSet1usefuldate: TStringField;
    ADODataSet1unusedate: TStringField;
    ADODataSet1cdate: TStringField;
    ADODataSet1operator: TStringField;
    ADODataSet1gradename: TStringField;
    ADODataSet1factorykind: TStringField;
    ADODataSet1ruleno: TStringField;
    ADODataSet1otkind: TStringField;
    ppReport2: TppReport;
    ppHeaderBand2: TppHeaderBand;
    ppLabel10: TppLabel;
    ppLabel21: TppLabel;
    ppLabel26: TppLabel;
    ppLabel29: TppLabel;
    ppLabel30: TppLabel;
    ppLabel31: TppLabel;
    ppLabel33: TppLabel;
    ppLabel34: TppLabel;
    ppLabel36: TppLabel;
    ppLabel37: TppLabel;
    ppLabel38: TppLabel;
    ppLabel39: TppLabel;
    ppLabel40: TppLabel;
    ppLine3: TppLine;
    ppLabel42: TppLabel;
    ppLabel43: TppLabel;
    ppLabel44: TppLabel;
    ppLabel45: TppLabel;
    ppSystemVariable3: TppSystemVariable;
    ppLabel46: TppLabel;
    ppSystemVariable4: TppSystemVariable;
    ppDetailBand2: TppDetailBand;
    ppDBText8: TppDBText;
    ppDBText18: TppDBText;
    ppDBText19: TppDBText;
    ppDBText22: TppDBText;
    ppDBText23: TppDBText;
    ppDBText24: TppDBText;
    ppDBText26: TppDBText;
    ppDBText27: TppDBText;
    ppDBText28: TppDBText;
    ppDBText29: TppDBText;
    ppDBText31: TppDBText;
    ppDBText32: TppDBText;
    ppLine4: TppLine;
    ppFooterBand2: TppFooterBand;
    ppSummaryBand1: TppSummaryBand;
    ppLabel47: TppLabel;
    ppDBCalc1: TppDBCalc;
    ppGroup1: TppGroup;
    ppGroupHeaderBand1: TppGroupHeaderBand;
    ppGroupFooterBand1: TppGroupFooterBand;
    ppLabel48: TppLabel;
    ppDBText33: TppDBText;
    ppLabel49: TppLabel;
    ppDBCalc2: TppDBCalc;
    ppSummaryBand2: TppSummaryBand;
    ppLabel50: TppLabel;
    ppDBCalc3: TppDBCalc;
    ppLine5: TppLine;
    procedure FormKeyPress(Sender: TObject; var Key: Char);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure ppReport1PreviewFormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure ppReport1AfterPrint(Sender: TObject);
    procedure ppDBText8GetText(Sender: TObject; var Text: String);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  reportformanchange: Treportformanchange;

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

procedure Treportformanchange.FormKeyPress(Sender: TObject; var Key: Char);
begin
  if key=#13 then    
   begin
     key:=#0;
     postmessage(handle,wm_keydown,vk_tab,0);
   end;
end;

procedure Treportformanchange.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  reportformanchange:=nil;
  action:=cafree;
end;

procedure Treportformanchange.ppReport1PreviewFormCreate(Sender: TObject);
begin
 tppReport(Sender).PreviewForm.WindowState:=wsMaximized;
 // TppViewer(tppReport(Sender).PreviewForm.Viewer).ZoomSetting := zsWholePage;
end;

procedure Treportformanchange.Button1Click(Sender: TObject);
var fmat1:string;
begin
  if fmat='/' then
    fmat1:='    /  /  ';
  if fmat='-' then
    fmat1:='    -  -  ';
  case radiogroup1.ItemIndex of
    0:
      begin
        adodataset1.Close;
        adodataset1.CommandText :='';
        adodataset1.commandtext:='select  * from per24013 order by workno';
        adodataset1.Open;
        pplabel18.Caption:=companyname1;//读取公司名称
        pplabel23.Caption :=pubworkname;//读取系统变量pubworkname
        pplabel19.Caption :='' ;
        ppReport1.print;
      end;
    1:
      begin
        if (maskedit1.Text<>fmat1) and(maskedit2.Text<>fmat1) then
        begin
          adodataset1.Close;
          adodataset1.CommandText :='';
          adodataset1.commandtext:='select  * from per24013 where usefuldate between convert(datetime,'''+maskedit1.Text+''') and convert(datetime,'''+maskedit2.Text+''') and unusedate between convert(datetime,'''+maskedit1.Text+''') and convert(datetime,'''+maskedit2.Text+''') order by workno';
          adodataset1.Open;
          pplabel18.Caption:=companyname1;//读取公司名称
          pplabel23.Caption :=pubworkname;//读取系统变量pubworkname
          pplabel19.Caption :=maskedit1.Text+'~~'+maskedit2.Text;
          ppReport1.print;
        end
        else
        begin
          Application.messagebox('列印日期不能为空','系统提示',48);
          exit;
        end;
      end;
    2:
      begin
        adodataset1.Close;
        adodataset1.CommandText :='';
        adodataset1.commandtext:='select  * from per24013 order by usefuldate,dept,workno';
        adodataset1.Open;
        pplabel40.Caption:=companyname1;//读取公司名称
        pplabel44.Caption :=pubworkname;//读取系统变量pubworkname
        ppreport2.Print;
      end;
   end;

end;

procedure Treportformanchange.Button2Click(Sender: TObject);
begin
  close;
end;

procedure Treportformanchange.ppReport1AfterPrint(Sender: TObject);
begin
  adodataset1.Close;
end;

procedure Treportformanchange.ppDBText8GetText(Sender: TObject;
  var Text: String);
begin
  if text='0' then
     text:='月薪'
  else
     text:='日薪';
end;

end.

⌨️ 快捷键说明

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