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

📄 uqueryimportyf.pas

📁 物流行业
💻 PAS
字号:
unit Uqueryimportyf;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ComCtrls, DB, DBTables, Buttons, ExtCtrls, Grids,
  DBGrids, DBCtrls,StrUtils, ADODB;

type
  Tfmqueryimportyf = class(TForm)
    DataSource1: TDataSource;
    Label1: TLabel;
    groupbox1: TGroupBox;
    GroupBox2: TGroupBox;
    DBGrid1: TDBGrid;
    BitBtn4: TBitBtn;
    StatusBar1: TStatusBar;
    Button1: TButton;
    BitBtn1: TBitBtn;
    Label2: TLabel;
    ComboBox1: TComboBox;
    RadioGroup1: TRadioGroup;
    Table1: TTable;
    RadioGroup2: TRadioGroup;
    procedure BitBtn4Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);

  private
    { Private declarations }
  public
   sstring:string;{ Public declarations }
  end;

var
  fmqueryimportyf: Tfmqueryimportyf;

implementation

uses Uimportreport;

{$R *.dfm}

procedure Tfmqueryimportyf.BitBtn4Click(Sender: TObject);
begin
fmqueryimportyf.Close;
end;


procedure Tfmqueryimportyf.Button1Click(Sender: TObject);
var lempty,lcc:string;

begin
if  radiogroup1.ItemIndex=0 then lempty:=' and (lzt=''E'')';
if  radiogroup1.ItemIndex=1 then lempty:=' and (lzt=''F'')';
if  radiogroup1.ItemIndex=2 then lempty:='';

if  radiogroup2.ItemIndex=0 then lcc:=' and (ccc='+'''20'''''''+')';
if  radiogroup2.ItemIndex=1 then lcc:=' and (ccc='+'''40'''''''+')';
if  radiogroup2.ItemIndex=2 then lcc:=' and (ccc='+'''45'''''''+')';
if  radiogroup2.ItemIndex=3 then lcc:='';





sstring:='drq='''+formatdatetime('yy-',now)+combobox1.Text+'*'+''''+lempty+lcc ;
table1.Filtered:=false;
table1.Filter:=sstring;
table1.Filtered:=true;
statusbar1.Panels[0].Text:='共计: '+inttostr(table1.RecordCount)+' 条记录 ';


end;

procedure Tfmqueryimportyf.FormActivate(Sender: TObject);
begin
statusbar1.Panels[0].Text:='共计: '+inttostr(table1.RecordCount)+' 条记录 ';
combobox1.SetFocus;
end;



procedure Tfmqueryimportyf.BitBtn1Click(Sender: TObject);
begin
application.CreateForm(Tfmimportreport,fmimportreport);
fmimportreport.Table1.TableName:='importcontainer.DB';
fmimportreport.Table1.Active:=true;
fmimportreport.Table1.Filtered:=false;
fmimportreport.Table1.Filter:=sstring;
fmimportreport.Table1.Filtered:=true;

fmimportreport.QuickRep1.DataSet:=fmimportreport.Table1;
fmimportreport.QRLabel18.Caption:=fmqueryimportyf.StatusBar1.Panels[0].Text;
fmimportreport.QRLabel19.Caption:='';
fmimportreport.QRLabel20.Caption:='';
fmimportreport.QRLabel21.Caption:='';
fmimportreport.QRLabel22.Caption:='';
fmimportreport.QRLabel23.Caption:='';
//fmimportreport.Table1.active:=true;
fmimportreport.QuickRep1.Preview;

end;

end.

⌨️ 快捷键说明

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