home *** CD-ROM | disk | FTP | other *** search
- //---------------------------------------------------------------------------
- #include <vcl\vcl.h>
- #pragma hdrstop
-
- #include "Main.h"
- #include "About.h"
- #include "Report.h"
- #include "FileCtrl.hpp"
- //---------------------------------------------------------------------------
- #pragma resource "*.dfm"
- TMainForm *MainForm;
- //---------------------------------------------------------------------------
- __fastcall TMainForm::TMainForm(TComponent* Owner)
- : TForm(Owner)
- {
- DebtsTable->Active = true;
- TotalQuery->Active = true;
- }
- //---------------------------------------------------------------------------
- void __fastcall TMainForm::DebtsTableCalcFields(TDataSet *DataSet)
- {
- DebtsTableYear->AsCurrency = DebtsTableFirstQuarter->AsCurrency +
- DebtsTableSecondQuarter->AsCurrency +
- DebtsTableThirdQuarter->AsCurrency +
- DebtsTableFourthQuarter->AsCurrency +
- DebtsTableYear->AsCurrency;
- }
- //---------------------------------------------------------------------------
- void __fastcall TMainForm::TotalQueryCalcFields(TDataSet *DataSet)
- {
- TotalQueryYear->AsCurrency = TotalQueryFirst->AsCurrency +
- TotalQuerySecond->AsCurrency +
- TotalQueryThird->AsCurrency +
- TotalQueryFourth->AsCurrency;
- }
- //---------------------------------------------------------------------------
- void __fastcall TMainForm::ExitActionExecute(TObject *Sender)
- {
- Close();
- }
- //---------------------------------------------------------------------------
- void __fastcall TMainForm::AboutActionExecute(TObject *Sender)
- {
- AboutBox->ShowModal ();
- }
- //---------------------------------------------------------------------------
- void __fastcall TMainForm::PrintSetupActionExecute(TObject *Sender)
- {
- RepForm->VividReport->PrinterSetup ();
- }
- //---------------------------------------------------------------------------
- void __fastcall TMainForm::PrintActionExecute(TObject *Sender)
- {
- if (RepForm->VividReport->PrintSetup ())
- {
- RepForm->VividReport->Print ();
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TMainForm::PrintPreviewActionExecute(TObject *Sender)
- {
- RepForm->VividReport->PrintPreview (RepForm->VRPreview);
- }
- //---------------------------------------------------------------------------
-
-