📄 trialbalancereport.pas
字号:
+ qryGLAccntAmount7.AsCurrency
+ qryGLAccntAmount8.AsCurrency
+ qryGLAccntAmount9.AsCurrency
+ qryGLAccntAmount10.AsCurrency;
end;
11: begin
qryGLAccntActualChange.AsCurrency := qryGLAccntAmount11.AsCurrency;
qryGLAccntActualBalance.AsCurrency := qryGLAccntOpeningBal.AsCurrency + qryGLAccntAmount1.AsCurrency
+ qryGLAccntAmount2.AsCurrency
+ qryGLAccntAmount3.AsCurrency
+ qryGLAccntAmount4.AsCurrency
+ qryGLAccntAmount5.AsCurrency
+ qryGLAccntAmount6.AsCurrency
+ qryGLAccntAmount7.AsCurrency
+ qryGLAccntAmount8.AsCurrency
+ qryGLAccntAmount9.AsCurrency
+ qryGLAccntAmount10.AsCurrency
+ qryGLAccntAmount11.AsCurrency;
end;
12: begin
qryGLAccntActualChange.AsCurrency := qryGLAccntAmount12.AsCurrency;
qryGLAccntActualBalance.AsCurrency := qryGLAccntOpeningBal.AsCurrency + qryGLAccntAmount1.AsCurrency
+ qryGLAccntAmount2.AsCurrency
+ qryGLAccntAmount3.AsCurrency
+ qryGLAccntAmount4.AsCurrency
+ qryGLAccntAmount5.AsCurrency
+ qryGLAccntAmount6.AsCurrency
+ qryGLAccntAmount7.AsCurrency
+ qryGLAccntAmount8.AsCurrency
+ qryGLAccntAmount9.AsCurrency
+ qryGLAccntAmount10.AsCurrency
+ qryGLAccntAmount11.AsCurrency
+ qryGLAccntAmount12.AsCurrency;
end;
end;
end else begin
case frmGLReports.GLPeriod of
1: begin
qryGLAccntBudgetChange.AsCurrency := qryGLAccntAmount1.AsCurrency;
qryGLAccntBudgetBalance.AsCurrency := qryGLAccntOpeningBal.AsCurrency + qryGLAccntAmount1.AsCurrency;
end;
2: begin
qryGLAccntBudgetChange.AsCurrency := qryGLAccntAmount2.AsCurrency;
qryGLAccntBudgetBalance.AsCurrency := qryGLAccntOpeningBal.AsCurrency + qryGLAccntAmount1.AsCurrency
+ qryGLAccntAmount2.AsCurrency;
end;
3: begin
qryGLAccntBudgetChange.AsCurrency := qryGLAccntAmount3.AsCurrency;
qryGLAccntBudgetBalance.AsCurrency := qryGLAccntOpeningBal.AsCurrency + qryGLAccntAmount1.AsCurrency
+ qryGLAccntAmount2.AsCurrency
+ qryGLAccntAmount3.AsCurrency;
end;
4: begin
qryGLAccntBudgetChange.AsCurrency := qryGLAccntAmount4.AsCurrency;
qryGLAccntBudgetBalance.AsCurrency := qryGLAccntOpeningBal.AsCurrency + qryGLAccntAmount1.AsCurrency
+ qryGLAccntAmount2.AsCurrency
+ qryGLAccntAmount3.AsCurrency
+ qryGLAccntAmount4.AsCurrency;
end;
5: begin
qryGLAccntBudgetChange.AsCurrency := qryGLAccntAmount5.AsCurrency;
qryGLAccntBudgetBalance.AsCurrency := qryGLAccntOpeningBal.AsCurrency + qryGLAccntAmount1.AsCurrency
+ qryGLAccntAmount2.AsCurrency
+ qryGLAccntAmount3.AsCurrency
+ qryGLAccntAmount4.AsCurrency
+ qryGLAccntAmount5.AsCurrency;
end;
6: begin
qryGLAccntBudgetChange.AsCurrency := qryGLAccntAmount6.AsCurrency;
qryGLAccntBudgetBalance.AsCurrency := qryGLAccntOpeningBal.AsCurrency + qryGLAccntAmount1.AsCurrency
+ qryGLAccntAmount2.AsCurrency
+ qryGLAccntAmount3.AsCurrency
+ qryGLAccntAmount4.AsCurrency
+ qryGLAccntAmount5.AsCurrency
+ qryGLAccntAmount6.AsCurrency;
end;
7: begin
qryGLAccntBudgetChange.AsCurrency := qryGLAccntAmount7.AsCurrency;
qryGLAccntBudgetBalance.AsCurrency := qryGLAccntOpeningBal.AsCurrency + qryGLAccntAmount1.AsCurrency
+ qryGLAccntAmount2.AsCurrency
+ qryGLAccntAmount3.AsCurrency
+ qryGLAccntAmount4.AsCurrency
+ qryGLAccntAmount5.AsCurrency
+ qryGLAccntAmount6.AsCurrency
+ qryGLAccntAmount7.AsCurrency;
end;
8: begin
qryGLAccntBudgetChange.AsCurrency := qryGLAccntAmount8.AsCurrency;
qryGLAccntBudgetBalance.AsCurrency := qryGLAccntOpeningBal.AsCurrency + qryGLAccntAmount1.AsCurrency
+ qryGLAccntAmount2.AsCurrency
+ qryGLAccntAmount3.AsCurrency
+ qryGLAccntAmount4.AsCurrency
+ qryGLAccntAmount5.AsCurrency
+ qryGLAccntAmount6.AsCurrency
+ qryGLAccntAmount7.AsCurrency
+ qryGLAccntAmount8.AsCurrency;
end;
9: begin
qryGLAccntBudgetChange.AsCurrency := qryGLAccntAmount9.AsCurrency;
qryGLAccntBudgetBalance.AsCurrency := qryGLAccntOpeningBal.AsCurrency + qryGLAccntAmount1.AsCurrency
+ qryGLAccntAmount2.AsCurrency
+ qryGLAccntAmount3.AsCurrency
+ qryGLAccntAmount4.AsCurrency
+ qryGLAccntAmount5.AsCurrency
+ qryGLAccntAmount6.AsCurrency
+ qryGLAccntAmount7.AsCurrency
+ qryGLAccntAmount8.AsCurrency
+ qryGLAccntAmount9.AsCurrency;
end;
10: begin
qryGLAccntBudgetChange.AsCurrency := qryGLAccntAmount10.AsCurrency;
qryGLAccntBudgetBalance.AsCurrency := qryGLAccntOpeningBal.AsCurrency + qryGLAccntAmount1.AsCurrency
+ qryGLAccntAmount2.AsCurrency
+ qryGLAccntAmount3.AsCurrency
+ qryGLAccntAmount4.AsCurrency
+ qryGLAccntAmount5.AsCurrency
+ qryGLAccntAmount6.AsCurrency
+ qryGLAccntAmount7.AsCurrency
+ qryGLAccntAmount8.AsCurrency
+ qryGLAccntAmount9.AsCurrency
+ qryGLAccntAmount10.AsCurrency;
end;
11: begin
qryGLAccntBudgetChange.AsCurrency := qryGLAccntAmount11.AsCurrency;
qryGLAccntBudgetBalance.AsCurrency := qryGLAccntOpeningBal.AsCurrency + qryGLAccntAmount1.AsCurrency
+ qryGLAccntAmount2.AsCurrency
+ qryGLAccntAmount3.AsCurrency
+ qryGLAccntAmount4.AsCurrency
+ qryGLAccntAmount5.AsCurrency
+ qryGLAccntAmount6.AsCurrency
+ qryGLAccntAmount7.AsCurrency
+ qryGLAccntAmount8.AsCurrency
+ qryGLAccntAmount9.AsCurrency
+ qryGLAccntAmount10.AsCurrency
+ qryGLAccntAmount11.AsCurrency;
end;
12: begin
qryGLAccntBudgetChange.AsCurrency := qryGLAccntAmount12.AsCurrency;
qryGLAccntBudgetBalance.AsCurrency := qryGLAccntOpeningBal.AsCurrency + qryGLAccntAmount1.AsCurrency
+ qryGLAccntAmount2.AsCurrency
+ qryGLAccntAmount3.AsCurrency
+ qryGLAccntAmount4.AsCurrency
+ qryGLAccntAmount5.AsCurrency
+ qryGLAccntAmount6.AsCurrency
+ qryGLAccntAmount7.AsCurrency
+ qryGLAccntAmount8.AsCurrency
+ qryGLAccntAmount9.AsCurrency
+ qryGLAccntAmount10.AsCurrency
+ qryGLAccntAmount11.AsCurrency
+ qryGLAccntAmount12.AsCurrency;
end;
end;
end;
end;
procedure TrptTrialBalance.FormCreate(Sender: TObject);
begin
qryGLAccnt.DatabaseName := strDatabaseName;
qryGLAccnt.Params[0].AsInteger := frmGLReports.GLYear;
qryGLAccnt.Active := true;
if frmGLReports.GLPeriod <10 then lblPeriod.caption := 'Period: 0' + IntToStr(frmGLReports.GLPeriod) + '/' + IntToStr(frmGLReports.GLYear)
else lblPeriod.caption := 'Period: ' + IntToStr(frmGLReports.GLPeriod) + '/' + IntToStr(frmGLReports.GLYear);
end;
procedure TrptTrialBalance.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
Action := caFree;
end;
procedure TrptTrialBalance.GLAccountBeforePrint(Sender: TQRCustomBand;
var PrintBand: Boolean);
begin
PrintBand := false;
end;
procedure TrptTrialBalance.DetailBeforePrint(Sender: TQRCustomBand;
var PrintBand: Boolean);
begin
PrintBand := false;
end;
procedure TrptTrialBalance.FooterBeforePrint(Sender: TQRCustomBand;
var PrintBand: Boolean);
begin
lblTotGActualChange.caption := FloatToStrF(totGActualChange.value.dblResult,ffCurrency,18,2);
lblTotGActualBalance.caption := FloatToStrF(totGActualBalance.value.dblResult,ffCurrency,18,2);
lblTotGBudgetChange.caption := FloatToStrF(totGBudgetChange.value.dblResult,ffCurrency,18,2);
lblTotGBudgetBalance.caption := FloatToStrF(totGBudgetBalance.value.dblResult,ffCurrency,18,2);
end;
procedure TrptTrialBalance.SummaryBeforePrint(Sender: TQRCustomBand;
var PrintBand: Boolean);
begin
lblTotRActualChange.caption := FloatToStrF(totRActualChange.value.dblResult,ffCurrency,18,2);
lblTotRActualBalance.caption := FloatToStrF(totRActualBalance.value.dblResult,ffCurrency,18,2);
lblTotRBudgetChange.caption := FloatToStrF(totRBudgetChange.value.dblResult,ffCurrency,18,2);
lblTotRBudgetBalance.caption := FloatToStrF(totRBudgetBalance.value.dblResult,ffCurrency,18,2);
end;
procedure TrptTrialBalance.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 + -