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

📄 zjmxprint.pas

📁 完整的公司合同管理系统,基于ACSESS数据库开发,无须安装任何其他插件.附带源码.免费提供.
💻 PAS
字号:
unit ZJMXPrint;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DB, ADODB, QuickRpt, QRCtrls, ExtCtrls;

type
  TfrmZJMXPrint = class(TForm)
    QuickRep1: TQuickRep;
    ADOQuery1: TADOQuery;
    QRBand1: TQRBand;
    QRLabel1: TQRLabel;
    QRLabel2: TQRLabel;
    QRShape1: TQRShape;
    QRBand2: TQRBand;
    QRShape2: TQRShape;
    QRShape3: TQRShape;
    QRShape4: TQRShape;
    QRBand3: TQRBand;
    QRShape5: TQRShape;
    QRLabel3: TQRLabel;
    QRDBText1: TQRDBText;
    QRDBText2: TQRDBText;
    QRLabel4: TQRLabel;
    QRShape6: TQRShape;
    QRShape7: TQRShape;
    QRShape8: TQRShape;
    QRLabel5: TQRLabel;
    QRLabel6: TQRLabel;
    QRShape9: TQRShape;
    QRShape10: TQRShape;
    QRShape11: TQRShape;
    QRShape12: TQRShape;
    QRShape13: TQRShape;
    QRLabel7: TQRLabel;
    QRShape14: TQRShape;
    QRLabel8: TQRLabel;
    QRLabel9: TQRLabel;
    QRLabel10: TQRLabel;
    QRLabel11: TQRLabel;
    QRLabel12: TQRLabel;
  private
    { Private declarations }
  public
    { Public declarations }
    function GetData(const HtID,HtName : string):boolean;
  end;
  procedure FuKuanMXPrint(const HtID,HtName : string);
var
  frmZJMXPrint: TfrmZJMXPrint;

implementation
  uses pdm,pub ;
{$R *.dfm}
function TfrmZJMXPrint.GetData(const HtID,HtName : string):boolean;
  function tongji(Const HtID : string) : boolean;
    var sql : string;
    begin
        sql := ' select sum(HtJE) as tHtJE from TAIZ where ID='+#39+HtID+#39;
        if HeTong_GetQueryData(Sql,AdoQuery1) then
           QRLabel11.Caption := AdoQuery1.FieldByName('tHtJE').Asstring;
        sql := ' select sum(JINE之SUM) as tHtJE from V_TAIZ where ID='+#39+HtID+#39;
        if HeTong_GetQueryData(Sql,AdoQuery1) then
           QRLabel12.Caption := AdoQuery1.FieldByName('tHtJE').Asstring;
        result :=true;
    end;
  function GetWtf(const HtID : string; var  Wtf : string) : boolean;
     var Text : string ;
     begin
         text := 'select * from TAIZ where ID='+#39+HtID+#39;
         HeTong_GetQueryData(text,ADOQuery1);
         Wtf := ADOQuery1.FieldByName('WTF').AsString;
         result:= true;
     end;

  function GetFuKuanMX(const HtID : string) : boolean;
     var Text : string ;
     begin
         text := 'select * from FK where ID='+#39+HtID+#39;
         HeTong_GetQueryData(text,ADOQuery1);
         result := true;
     end;
var Wtf : string;
begin
   if Tongji(HtID) then
   if GetWtf(HtID,Wtf) then
      if GetFuKuanMX(HtID) then
         begin
             QRLabel3.Caption := '制表时间: '+ForMatDateTime('yyyy',date)+'年'+ForMatDateTime('mm',date)+'月'+ForMatDateTime('dd',date)+'日';
             QRLabel2.Caption := '乙方单位: '+Wtf;
             QRLabel1.Caption := HtName+'付款明细单';

         end;
         result := true;
end;

procedure FuKuanMXPrint(const HtID,HtName : string);
begin
  Application.CreateForm(TfrmZJMXPrint,frmZJMXPrint);
  with frmZJMXPrint do
       begin
           if GetData(HtID,HtName) then
              QuickRep1.Preview;
       end;
end;
end.

⌨️ 快捷键说明

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