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

📄 glbalancesreport.pas

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

interface

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

type
  TrptGLBalances = class(TForm)
    QuickReport: TQuickRep;
    Title: TQRBand;
    PageHeader: TQRBand;
    Detail: TQRBand;
    PageFooter: TQRBand;
    QRSysData1: TQRSysData;
    QRLabel1: TQRLabel;
    txtGLAccount: TQRDBText;
    txtAccountName: TQRDBText;
    QRLabel2: TQRLabel;
    PageNumber: TQRSysData;
    QRShape1: TQRShape;
    QRShape2: TQRShape;
    QRShape3: TQRShape;
    qryGLAccnt: TQuery;
    QRLabel3: TQRLabel;
    QRDateTime: TQRSysData;
    qryGLAccntGLYear: TSmallintField;
    QRLabel8: TQRLabel;
    txtAmount1: TQRDBText;
    qryGLAccntGLAccount: TStringField;
    qryGLAccntAccountName: TStringField;
    txtGLYear: TQRDBText;
    qryGLAccntOpeningBal: TCurrencyField;
    qryGLAccntAmount1: TCurrencyField;
    qryGLAccntAmount2: TCurrencyField;
    qryGLAccntAmount3: TCurrencyField;
    qryGLAccntAmount4: TCurrencyField;
    qryGLAccntAmount5: TCurrencyField;
    qryGLAccntAmount6: TCurrencyField;
    qryGLAccntAmount7: TCurrencyField;
    qryGLAccntAmount8: TCurrencyField;
    qryGLAccntAmount9: TCurrencyField;
    qryGLAccntAmount10: TCurrencyField;
    qryGLAccntAmount11: TCurrencyField;
    qryGLAccntAmount12: TCurrencyField;
    QRLabel4: TQRLabel;
    QRLabel5: TQRLabel;
    QRLabel6: TQRLabel;
    QRLabel7: TQRLabel;
    QRLabel9: TQRLabel;
    QRLabel10: TQRLabel;
    QRLabel11: TQRLabel;
    QRLabel12: TQRLabel;
    QRLabel13: TQRLabel;
    QRLabel14: TQRLabel;
    QRLabel15: TQRLabel;
    QRLabel16: TQRLabel;
    txtOpeningBal: TQRDBText;
    txtAmount2: TQRDBText;
    txtAmount3: TQRDBText;
    txtAmount4: TQRDBText;
    txtAmount5: TQRDBText;
    txtAmount6: TQRDBText;
    txtAmount7: TQRDBText;
    txtAmount8: TQRDBText;
    txtAmount9: TQRDBText;
    txtAmount10: TQRDBText;
    txtAmount11: TQRDBText;
    txtAmount12: TQRDBText;
    Summary: TQRBand;
    QRLabel17: TQRLabel;
    lblTotROpeningBal: TQRLabel;
    QRShape4: TQRShape;
    lblTotRAmount1: TQRLabel;
    lblTotRAmount2: TQRLabel;
    lblTotRAmount3: TQRLabel;
    lblTotRAmount4: TQRLabel;
    lblTotRAmount5: TQRLabel;
    lblTotRAmount6: TQRLabel;
    lblTotRAmount7: TQRLabel;
    lblTotRAmount8: TQRLabel;
    lblTotRAmount9: TQRLabel;
    lblTotRAmount10: TQRLabel;
    lblTotRAmount11: TQRLabel;
    lblTotRAmount12: TQRLabel;
    QRShape5: TQRShape;
    QRShape6: TQRShape;
    QRShape7: TQRShape;
    QRShape8: TQRShape;
    QRShape9: TQRShape;
    QRShape10: TQRShape;
    QRShape11: TQRShape;
    QRShape12: TQRShape;
    QRShape13: TQRShape;
    QRShape14: TQRShape;
    QRShape15: TQRShape;
    QRShape16: TQRShape;
    totRAmount12: TQRExpr;
    totRAmount11: TQRExpr;
    totRAmount10: TQRExpr;
    totRAmount9: TQRExpr;
    totRAmount8: TQRExpr;
    totRAmount7: TQRExpr;
    totRAmount6: TQRExpr;
    totRAmount5: TQRExpr;
    totRAmount4: TQRExpr;
    totRAmount3: TQRExpr;
    totRAmount2: TQRExpr;
    totRAmount1: TQRExpr;
    totROpeningBal: TQRExpr;
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure SummaryBeforePrint(Sender: TQRCustomBand;
      var PrintBand: Boolean);
    procedure QuickReportPreview(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  rptGLBalances: TrptGLBalances;

implementation

uses BS1Form, PreviewForm;

{$R *.DFM}

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

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

procedure TrptGLBalances.SummaryBeforePrint(Sender: TQRCustomBand;
  var PrintBand: Boolean);
begin
  lblTotROpeningBal.caption := FloatToStrF(totROpeningBal.value.dblResult,ffCurrency,18,2);
  lblTotRAmount1.caption := FloatToStrF(totRAmount1.value.dblResult,ffCurrency,18,2);
  lblTotRAmount2.caption := FloatToStrF(totRAmount2.value.dblResult,ffCurrency,18,2);
  lblTotRAmount3.caption := FloatToStrF(totRAmount3.value.dblResult,ffCurrency,18,2);
  lblTotRAmount4.caption := FloatToStrF(totRAmount4.value.dblResult,ffCurrency,18,2);
  lblTotRAmount5.caption := FloatToStrF(totRAmount5.value.dblResult,ffCurrency,18,2);
  lblTotRAmount6.caption := FloatToStrF(totRAmount6.value.dblResult,ffCurrency,18,2);
  lblTotRAmount7.caption := FloatToStrF(totRAmount7.value.dblResult,ffCurrency,18,2);
  lblTotRAmount8.caption := FloatToStrF(totRAmount8.value.dblResult,ffCurrency,18,2);
  lblTotRAmount9.caption := FloatToStrF(totRAmount9.value.dblResult,ffCurrency,18,2);
  lblTotRAmount10.caption := FloatToStrF(totRAmount10.value.dblResult,ffCurrency,18,2);
  lblTotRAmount11.caption := FloatToStrF(totRAmount11.value.dblResult,ffCurrency,18,2);
  lblTotRAmount12.caption := FloatToStrF(totRAmount12.value.dblResult,ffCurrency,18,2);
end;

procedure TrptGLBalances.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 + -