//---------------------------------------------------------------------------

#ifndef PrintAuditTrail_Ajanta_FormH
#define PrintAuditTrail_Ajanta_FormH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "TntStdCtrls.hpp"
#include <ExtCtrls.hpp>
#include <QuickRpt.hpp>
#include <QRCtrls.hpp>
#include "CSVLog.h"
#include <ComCtrls.hpp>
//---------------------------------------------------------------------------
#define MAX_FIRST_PAGE_DATA_CNT 15
#define MAX_PAGE_DATA_CNT  25
#define HEIGHT_CHART_ROW  29
//---------------------------------------------------------------------------
class TPrintAuditTrail_Ajanta_Form : public TForm
{
__published:	// IDE-managed Components
    TTntButton *TntButton1;
    TTntButton *TntButton2;
    TTntButton *TntButton3;
    TTntButton *TntButton4;
    TPanel *Panel1;
    TPanel *Panel2;
    TGroupBox *GroupBox1;
    TPanel *Panel3;
    TStaticText *StaticText2;
    TStaticText *ReportPageLabel;
    TUpDown *UpDown1;
    TQRCompositeReport *QRCompositeReport;
  TQuickRep *SubRep2;
  TQRBand *SummaryBand1;
  TQRShape *QRShape33;
  TQRLabel *RepGenPageValueLabel1;
  TQRBand *TitleBand1;
  TQRLabel *PrintCompanyLabel2;
  TQRLabel *PrintTitleLabel2;
  TQRLabel *RepGenPageLabel1;
  TQRLabel *RepGenDateLabel1;
  TQRLabel *RepGenDateValueLabel1;
  TQRShape *QRShapeH1;
  TQRShape *QRShapeV1;
  TQRShape *QRShapeV4;
  TQRShape *QRShapeH2;
  TQRShape *QRShapeV2;
  TQRShape *QRShapeV3;
  TQRLabel *EventTitleLabel2;
  TQRLabel *ContentTitleLabel2;
  TQRLabel *UserTitleLabel2;
  TQRLabel *MemoLabel1;
  TQRLabel *EOLabel1;
  TQRLabel *UserLabel1;
  TQRShape *QRShapeH4;
  TQRLabel *EOLabel2;
  TQRLabel *MemoLabel2;
  TQRLabel *UserLabel2;
  TQRShape *QRShapeH5;
  TQRLabel *EOLabel3;
  TQRLabel *MemoLabel3;
  TQRLabel *UserLabel3;
  TQRShape *QRShapeH6;
  TQRLabel *EOLabel4;
  TQRLabel *MemoLabel4;
  TQRLabel *UserLabel4;
  TQRShape *QRShapeH7;
  TQRLabel *EOLabel5;
  TQRLabel *MemoLabel5;
  TQRLabel *UserLabel5;
  TQRShape *QRShapeH8;
  TQRLabel *EOLabel6;
  TQRLabel *MemoLabel6;
  TQRLabel *UserLabel6;
  TQRShape *QRShapeH9;
  TQRLabel *EOLabel7;
  TQRLabel *MemoLabel7;
  TQRLabel *UserLabel7;
  TQRShape *QRShapeH10;
  TQRLabel *EOLabel8;
  TQRLabel *MemoLabel8;
  TQRLabel *UserLabel8;
  TQRShape *QRShapeH11;
  TQRLabel *EOLabel9;
  TQRLabel *MemoLabel9;
  TQRLabel *UserLabel9;
  TQRShape *QRShapeH12;
  TQRLabel *MemoLabel10;
  TQRLabel *EOLabel10;
  TQRLabel *UserLabel10;
  TQRShape *QRShapeH13;
  TQRLabel *MemoLabel11;
  TQRLabel *EOLabel11;
  TQRLabel *UserLabel11;
  TQRShape *QRShapeH14;
  TQRLabel *MemoLabel12;
  TQRLabel *EOLabel12;
  TQRLabel *UserLabel12;
  TQRShape *QRShapeH15;
  TQRLabel *MemoLabel13;
  TQRLabel *EOLabel13;
  TQRLabel *UserLabel13;
  TQRShape *QRShapeH16;
  TQRLabel *MemoLabel14;
  TQRLabel *EOLabel14;
  TQRLabel *UserLabel14;
  TQRShape *QRShapeH17;
  TQRLabel *MemoLabel15;
  TQRLabel *EOLabel15;
  TQRLabel *UserLabel15;
  TQuickRep *SubRep1;
  TQRBand *QRBand3;
  TQRShape *QRShape14;
  TQRShape *QRShape39;
  TQRShape *QRShape40;
  TQRShape *QRShape41;
  TQRShape *QRShape42;
  TQRLabel *QRLabel73;
  TQRLabel *QRLabel74;
  TQRLabel *QRLabel75;
  TQRLabel *QRLabel76;
  TQRLabel *QRLabel77;
  TQRLabel *QRLabel78;
  TQRLabel *QRLabel79;
  TQRLabel *QRLabel80;
  TQRLabel *QRLabel81;
  TQRLabel *QRLabel82;
  TQRShape *QRShape43;
  TQRLabel *QRLabel83;
  TQRLabel *QRLabel84;
  TQRShape *QRShape44;
  TQRShape *QRShape45;
  TQRLabel *QRLabel85;
  TQRShape *QRShape46;
  TQRLabel *QRLabel86;
  TQRShape *QRShape47;
  TQRShape *QRShape48;
  TQRLabel *QRLabel95;
  TQRLabel *QRLabel96;
  TQRShape *QRShapeMH1;
  TQRShape *QRShapeMV1;
  TQRShape *QRShapeMV4;
  TQRShape *QRShapeMH2;
  TQRShape *QRShapeMV2;
  TQRShape *QRShapeMV3;
  TQRLabel *EventTitleLabel;
  TQRLabel *ContentTitleLabel;
  TQRLabel *UserTitleLabel;
  TQRShape *QRShapeMH3;
  TQRLabel *MemoMLabel1;
  TQRLabel *EOMLabel1;
  TQRLabel *UserMLabel1;
  TQRShape *QRShapeMH4;
  TQRLabel *EOMLabel2;
  TQRLabel *MemoMLabel2;
  TQRLabel *UserMLabel2;
  TQRShape *QRShapeMH5;
  TQRLabel *EOMLabel3;
  TQRLabel *MemoMLabel3;
  TQRLabel *UserMLabel3;
  TQRShape *QRShapeMH6;
  TQRLabel *EOMLabel4;
  TQRLabel *MemoMLabel4;
  TQRLabel *UserMLabel4;
  TQRShape *QRShapeMH7;
  TQRLabel *EOMLabel5;
  TQRLabel *MemoMLabel5;
  TQRLabel *UserMLabel5;
  TQRShape *QRShapeMH8;
  TQRLabel *EOMLabel6;
  TQRLabel *MemoMLabel6;
  TQRLabel *UserMLabel6;
  TQRShape *QRShapeMH9;
  TQRLabel *EOMLabel7;
  TQRLabel *MemoMLabel7;
  TQRLabel *UserMLabel7;
  TQRShape *QRShapeMH10;
  TQRLabel *EOMLabel8;
  TQRLabel *MemoMLabel8;
  TQRLabel *UserMLabel8;
  TQRShape *QRShapeMH11;
  TQRLabel *EOMLabel9;
  TQRLabel *MemoMLabel9;
  TQRLabel *UserMLabel9;
  TQRShape *QRShapeMH12;
  TQRLabel *MemoMLabel10;
  TQRLabel *EOMLabel10;
  TQRLabel *UserMLabel10;
  TQRShape *QRShapeMH13;
  TQRLabel *MemoMLabel11;
  TQRLabel *EOMLabel11;
  TQRLabel *UserMLabel11;
  TQRShape *QRShapeMH14;
  TQRLabel *MemoMLabel12;
  TQRLabel *EOMLabel12;
  TQRLabel *UserMLabel12;
  TQRShape *QRShapeMH15;
  TQRLabel *MemoMLabel13;
  TQRLabel *EOMLabel13;
  TQRLabel *UserMLabel13;
  TQRShape *QRShapeMH16;
  TQRLabel *MemoMLabel14;
  TQRLabel *EOMLabel14;
  TQRLabel *UserMLabel14;
  TQRShape *QRShapeMH17;
  TQRLabel *MemoMLabel15;
  TQRLabel *EOMLabel15;
  TQRLabel *UserMLabel15;
  TQRBand *QRBand4;
  TQRLabel *PrintCompanyLabel1;
  TQRLabel *PrintTitleLabel;
  TQRLabel *RepGenUserLabel1;
  TQRShape *QRShapeH18;
  TQRLabel *UserLabel16;
  TQRLabel *MemoLabel16;
  TQRLabel *EOLabel16;
  TQRShape *QRShapeH19;
  TQRLabel *UserLabel17;
  TQRLabel *MemoLabel17;
  TQRLabel *EOLabel17;
  TQRShape *QRShapeH20;
  TQRLabel *UserLabel18;
  TQRLabel *MemoLabel18;
  TQRLabel *EOLabel18;
  TQRShape *QRShapeH21;
  TQRLabel *UserLabel19;
  TQRLabel *MemoLabel19;
  TQRLabel *EOLabel19;
  TQRShape *QRShapeH22;
  TQRLabel *UserLabel20;
  TQRLabel *MemoLabel20;
  TQRLabel *EOLabel20;
  TQRShape *QRShapeH23;
  TQRLabel *UserLabel21;
  TQRLabel *MemoLabel21;
  TQRLabel *EOLabel21;
  TQRShape *QRShapeH24;
  TQRLabel *UserLabel22;
  TQRLabel *MemoLabel22;
  TQRLabel *EOLabel22;
  TQRShape *QRShapeH25;
  TQRLabel *UserLabel23;
  TQRLabel *MemoLabel23;
  TQRLabel *EOLabel23;
  TQRShape *QRShapeH26;
  TQRLabel *UserLabel24;
  TQRLabel *MemoLabel24;
  TQRLabel *EOLabel24;
  TQRShape *QRShapeH27;
  TQRLabel *UserLabel25;
  TQRLabel *MemoLabel25;
  TQRLabel *EOLabel25;
  TQRLabel *QRLabel1;
  TQRLabel *RepGenUserNameValueLabel1;
  TQRLabel *QRNameofmachine;
  TQRLabel *QRMachineID;
  TQRLabel *QRProductCode;
  TQRLabel *QROperator;
  TQRLabel *QRStartDateTime;
  TQRLabel *QREndDateTime;
  TTimer *Timer1;
  TQRShape *QRShapeH3;
    void __fastcall TntButton1Click(TObject *Sender);
    void __fastcall TntButton3Click(TObject *Sender);
    void __fastcall TntButton2Click(TObject *Sender);
    void __fastcall TntButton4Click(TObject *Sender);
    void __fastcall UpDown1Click(TObject *Sender, TUDBtnType Button);
    void __fastcall QRCompositeReportAddReports(TObject *Sender);
  void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  void __fastcall Timer1Timer(TObject *Sender);

private:	// User declarations
    TCSVLogList *CSVLogList;
    TDateTime BrowseStartTime;
    TDateTime BrowseEndTime;    
    int PageNum;
    int allPageDataCnt;

    void __fastcall CreateReportPage(int dataCnt,bool FormStyle);
public:		// User declarations
    __fastcall TPrintAuditTrail_Ajanta_Form(TComponent* Owner);
    void __fastcall SetReport(TCSVLogList* csvList, int nValidData, bool bAction, bool bEvent, bool bAlarm, double StartTime, double EndTime, int stLogIndex, int edLogIndex, bool bLimit,AnsiString ProductName , AnsiString CreatorName);
    int Zorder;
};
//---------------------------------------------------------------------------
extern PACKAGE TPrintAuditTrail_Ajanta_Form *PrintAuditTrail_Ajanta_Form;
//---------------------------------------------------------------------------
#endif
