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

📄 glaccountsreport.pas

📁 功能全面的商业财会系统源码,清晰,很有参考价值.扩展性强.
💻 PAS
字号:
unit GLAccountsReport;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ExtCtrls, DBTables, DB, quickrpt, Qrctrls, qrprntr;

type
  TrptGLAccounts = class(TForm)
    QuickReport: TQuickRep;
    Title: TQRBand;
    PageHeader: TQRBand;
    Detail: TQRBand;
    PageFooter: TQRBand;
    QRSysData1: TQRSysData;
    QRLabel1: TQRLabel;
    txtGLAccount: TQRDBText;
    txtAccountName: TQRDBText;
    txtAccountTypeName: TQRDBText;
    QRLabel2: TQRLabel;
    QRLabel4: TQRLabel;
    PageNumber: TQRSysData;
    QRShape1: TQRShape;
    QRShape2: TQRShape;
    QRShape3: TQRShape;
    qryGLAccnt: TQuery;
    qryGLAccntGLAccount: TStringField;
    qryGLAccntAccountName: TStringField;
    qryGLAccntNotes: TMemoField;
    qryGLAccntAccountType: TSmallintField;
    qryGLAccntSuspended: TBooleanField;
    txtNotes: TQRDBText;
    qryGLAccntAccountTypeName: TStringField;
    QRLabel3: TQRLabel;
    QRDateTime: TQRSysData;
    procedure qryGLAccntCalcFields(DataSet: TDataSet);
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure QuickReportPreview(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  rptGLAccounts: TrptGLAccounts;

implementation

uses BS1Form, PreviewForm;

{$R *.DFM}

procedure TrptGLAccounts.qryGLAccntCalcFields(DataSet: TDataSet);
begin
  case qryGLAccntAccountType.Value of
    1: qryGLAccntAccountTypeName.Value := 'Asset';
    2: qryGLAccntAccountTypeName.Value := 'Liability';
    3: qryGLAccntAccountTypeName.Value := 'Revenue';
    4: qryGLAccntAccountTypeName.Value := 'Expense';
    5: qryGLAccntAccountTypeName.Value := 'Ret. Earnings';
    else qryGLAccntAccountTypeName.Value := '';
  end;
end;

procedure TrptGLAccounts.FormCreate(Sender: TObject);
begin
  qryGLAccnt.DatabaseName := strDatabaseName;
  //qryGLAccnt.Active := true;
end;

procedure TrptGLAccounts.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  Action := caFree;
end;

procedure TrptGLAccounts.QuickReportPreview(Sender: TObject);
begin
  frmPreview := TfrmPreview.Create(Application);
  frmPreview.QRPreview1.QRPrinter := TQRPrinter(sender);
  frmPreview.QuickReport := QuickReport;   //Set dummy quickreport so as to be able to apply selected printer and from/to page.
  frmPreview.show;
end;

end.

⌨️ 快捷键说明

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