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

📄 uqueryinyf.pas

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

interface

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

type
  Tfmqueryinyf = class(TForm)
    DataSource1: TDataSource;
    Label1: TLabel;
    groupbox1: TGroupBox;
    GroupBox2: TGroupBox;
    BitBtn4: TBitBtn;
    StatusBar1: TStatusBar;
    BitBtn1: TBitBtn;
    Table1: TTable;
    DBGrid1: TDBGrid;
    Label2: TLabel;
    ComboBox1: TComboBox;
    Label3: TLabel;
    ComboBox2: TComboBox;
    Label4: TLabel;
    ComboBox3: TComboBox;
    Label5: TLabel;
    ComboBox4: TComboBox;
    Button1: TButton;
    procedure BitBtn4Click(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);

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

var
  fmqueryinyf: Tfmqueryinyf;

implementation

uses Uoperinreport;

{$R *.dfm}

procedure Tfmqueryinyf.BitBtn4Click(Sender: TObject);
begin
fmqueryinyf.Close;
end;


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



procedure Tfmqueryinyf.Button1Click(Sender: TObject);
var ldl,lcc,lxx:string;

begin

if combobox2.ItemIndex<>4 then ldl:=' and cdl='''+combobox2.Text+'''' else ldl:='';

if combobox3.ItemIndex<>3 then lcc:=' and ccc='''+combobox3.Text+'''''' else lcc:='';

if combobox4.ItemIndex<>4 then lxx:=' and cxx='''+combobox4.Text+'''' else lxx:='';



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

end;

procedure Tfmqueryinyf.BitBtn1Click(Sender: TObject);
begin
application.CreateForm(Tfmoperinreport,fmoperinreport);
fmoperinreport.Table1.TableName:='operin.DB';
fmoperinreport.Table1.Active:=true;
fmoperinreport.Table1.Filtered:=false;
fmoperinreport.Table1.Filter:=sstring;
fmoperinreport.Table1.Filtered:=true;
fmoperinreport.QuickRep1.DataSet:=fmoperinreport.Table1;
fmoperinreport.QRExpr3.Top:=fmoperinreport.QRExpr2.Top;
fmoperinreport.QuickRep1.Preview;

end;

end.

⌨️ 快捷键说明

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