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

📄 cgreport.~pas

📁 在打沙场用的最简单
💻 ~PAS
字号:
unit cgreport;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ubasereport, DB, DBTables, Grids, DBGridEh, StdCtrls, Buttons,
  PDJComEdit, wwdblook, wwdbdatetimepicker, Mask, wwdbedit, ExtCtrls,common,
  DBGrids, DBClient,MDIbaseinfo, ADODB;

type
  Tfrmreport = class(Tfrmbasereport)
    procedure spbtnprintClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }

  public
    { Public declarations }
  end;


var
  frmreport: Tfrmreport;

//  findArray2:TfindArray2;

implementation
uses Global;
{$R *.dfm}

procedure Tfrmreport.spbtnprintClick(Sender: TObject);
var
i:integer;
begin
  inherited;

    adoquery1.SQL.Clear;
    adoquery1.SQL.Add('select  b.fpurno,b.fpurstore,b.fpurer,b.fprovider,b.fnote as note2,b.fdelivdate,b.fcreauser,b.fcreadate,');
    adoquery1.sql.add('c.fcode,c.fname,c.zs,a.colorno,a.color,a.gno,c.funit,c.ftype,a.fqty,a.cgyrqty,b.frefno');//,a.fprice,a.fnote,b.fprice as price2
    adoquery1.SQL.add('   from Tpurchasesub a,Tpurchase  b ,titem c');
    adoquery1.SQL.add('  where a.fresid=b.fresid  and c.fid=a.fitemid');
//    searq.SQL.Add('select * from vcg');
    if refno.text<>'' then
    begin
    adoquery1.SQL.add(' and b.frefno =:frefno');
    adoquery1.Parameters.ParamByName('frefno').Value:=refno.Text; //采购号
    end;
    if billno.text<>'' then
    begin
    adoquery1.SQL.add(' and b.fpurno =:fpurno');
    adoquery1.Parameters.ParamByName('fpurno').Value:=billno.text;
    end;
    if edit1.text<>'' then
    begin
    adoquery1.SQL.add(' and c.fcode =:fcode');
    adoquery1.Parameters.ParamByName('fcode').Value:=edit1.text;
    end;
    if edit2.text<>'' then
    begin
    adoquery1.SQL.add(' and c.fname like :fname');
    adoquery1.Parameters.ParamByName('fname').Value:='%' + edit2.text+ '%';
    end;
    if edit3.text<>'' then
    begin
    adoquery1.SQL.add(' and a.color like :color');
    adoquery1.Parameters.ParamByName('color').value:='%'+edit3.text+'%';
    end;
    if edit4.text<>'' then
    begin
    adoquery1.SQL.add(' and a.colorno =:colorno');
    adoquery1.Parameters.ParamByName('colorno').Value:=edit4.text;
    end;
    if edit5.text<>'' then
    begin
    adoquery1.SQL.add(' and c.zs =:zs');
    adoquery1.Parameters.ParamByName('zs').Value:=edit5.text;
    end;
    if edit6.text<>'' then
    begin
    adoquery1.SQL.add(' and a.gno =:gno');
    adoquery1.Parameters.ParamByName('gno').Value:=edit6.text;
    end;

    adoquery1.Open;
     for i:=0 to  dbgrideh1.Columns.Count-1 do
     dbgrideh1.Columns[i].Width:=64;





end;

procedure Tfrmreport.FormCreate(Sender: TObject);

begin
  inherited;

{  stringgrid1.ColCount:=20;
  StringGrid1.Cells[0,0]:='批号';
  StringGrid1.Cells[1,0]:='仓库';
  StringGrid1.Cells[2,0]:='负责人';
  StringGrid1.Cells[3,0]:='供应商';
  StringGrid1.Cells[4,0]:='备注';
  StringGrid1.Cells[5,0]:='交货日期';
  StringGrid1.Cells[6,0]:='创建人';
  StringGrid1.Cells[7,0]:='订货日期';
///////////////////////////////////////////以上是头
  StringGrid1.Cells[8,0]:='物料代码';
  StringGrid1.Cells[9,0]:='成分';
  StringGrid1.Cells[10,0]:='支数';
  StringGrid1.Cells[11,0]:='色号';
  StringGrid1.Cells[12,0]:='颜色';
  StringGrid1.Cells[13,0]:='缸号';
  StringGrid1.Cells[14,0]:='单位';
  StringGrid1.Cells[15,0]:='类型';
  StringGrid1.Cells[16,0]:='重量';
  StringGrid1.Cells[17,0]:='备注';
  StringGrid1.Cells[18,0]:='已入量';
  StringGrid1.Cells[19,0]:='采购编号';}  
end;

end.

⌨️ 快捷键说明

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