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

#ifndef PrintInspectionResult_FormH
#define PrintInspectionResult_FormH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <QRCtrls.hpp>
#include <QuickRpt.hpp>
#include "TntForms.hpp"
#include "SelectDefectImage_Form.h"  

#include "Common_PC.h"
#include <Graphics.hpp>
#include "TntExtCtrls.hpp"
#include "TntStdCtrls.hpp"
#include <ComCtrls.hpp>
#include <Chart.hpp>
#include <DbChart.hpp>
#include <QRTEE.hpp>
#include <TeEngine.hpp>
#include <TeeProcs.hpp>
#include <Series.hpp>

#define ETC_MAX_LIST_NUMBER 20
//---------------------------------------------------------------------------
class TPrintInspectionResultForm : public TTntForm
{
__published:	// IDE-managed Components
	TTntPanel *ReportPanel1;
	TQuickRep *QuickRep1;
	TQRBand *QRBand1;
	TQRLabel *QRLabel1;
	TTntPanel *Panel1;
	TTntPanel *Panel3;
	TTntButton *PrintPreviewButton;
    TTntButton *CancelButton;
    TQRBand *QRBand2;
    TQRLabel *QRLabel23;
    TQRLabel *QRLabel24;
    TQRLabel *QRLabel25;
    TQRLabel *QRLabel26;
    TQRLabel *QRLabel27;
    TQRLabel *QRLabel29;
    TQRLabel *QRLabel30;
    TQRLabel *QRLabel31;
    TQRLabel *QRLabel32;
    TQRShape *QRShape32;
    TQRShape *QRShape33;
    TQRShape *QRShape34;
    TQRLabel *FrontNormalDirtyGradeQRLabel;
    TQRLabel *FrontPrintDirtyGradeQRLabel;
	TQRLabel *FrontEdgeDirtyGradeQRLabel;
	TQRLabel *FrontStainGradeQRLabel;
	TQRLabel *OptionBreakingGradeQRLabel;
    TQRLabel *SideDirtyGradeQRLabel;
    TQRLabel *SideStainGradeQRLabel;
    TTntButton *PrintButton;
    TTntButton *PrinterSetupButton;
    TQRLabel *QRLabel19;
    TQRLabel *QRLabel34;
  TQRLabel *OptionFrontStickingGradeType1QRLabel;
    TQRLabel *QRLabel36;
    TQRLabel *OptionPrintMarkGradeQRLabel;
	TQRLabel *QRLabel16;
	TQRLabel *FrontColorDirtyGradeQRLabel;
	TQRLabel *QRLabel37;
	TQRLabel *FrontEdgeStainGradeQRLabel;
  TQRLabel *PrintEraseGradeQRLabel;
	TQRShape *QRShape13;
	TQRShape *QRShape35;
	TQRLabel *QRLabel18;
	TQRLabel *ColorGradeQRLabel;
	TTntGroupBox *GroupBox1;
	TTntRadioButton *PrintGradeOnlyRadioButton;
	TTntRadioButton *PrintGradeAndSizeRadioButton;
	TTntPanel *ReportPanel2;
	TQuickRep *QuickRep2;
	TQRBand *QRBand3;
	TQRShape *QRShape36;
	TQRLabel *QRLabel59;
	TQRLabel *QRLabel63;
	TQRLabel *QRLabel64;
	TQRLabel *QRLabel65;
	TQRLabel *QRLabel66;
	TQRLabel *QRLabel67;
	TQRLabel *QRLabel68;
	TQRLabel *QRLabel69;
	TQRLabel *QRLabel70;
	TQRLabel *QRLabel71;
	TQRLabel *QRLabel72;
	TQRLabel *QRLabel73;
	TQRLabel *QRLabel74;
	TQRShape *QRShape51;
	TQRShape *QRShape52;
	TQRShape *QRShape53;
	TQRShape *QRShape54;
	TQRShape *QRShape55;
	TQRShape *QRShape56;
	TQRShape *QRShape57;
	TQRShape *QRShape58;
	TQRShape *QRShape59;
	TQRShape *QRShape60;
	TQRShape *QRShape61;
	TQRShape *QRShape62;
	TQRShape *QRShape63;
	TQRLabel *FrontNormalDirtyGradeQRLabel2;
	TQRLabel *FrontPrintDirtyGradeQRLabel2;
	TQRLabel *FrontEdgeDirtyGradeQRLabel2;
	TQRLabel *FrontStainGradeQRLabel2;
	TQRLabel *OptionBreakingGradeQRLabel2;
	TQRLabel *SideDirtyGradeQRLabel2;
	TQRLabel *SideStainGradeQRLabel2;
	TQRLabel *ThreeDHeightMinusLimitQRLabel2;
	TQRShape *QRShape64;
	TQRShape *QRShape65;
	TQRLabel *QRLabel85;
	TQRLabel *QRLabel86;
  TQRLabel *OptionFrontStickingGradeType1QRLabel2;
	TQRLabel *QRLabel88;
	TQRLabel *OptionPrintMarkGradeQRLabel2;
	TQRShape *QRShape67;
	TQRLabel *QRLabel91;
	TQRLabel *FrontColorDirtyGradeQRLabel2;
	TQRLabel *QRLabel93;
	TQRLabel *FrontEdgeStainGradeQRLabel2;
	TQRLabel *PrintEraseGradeQRLabel2;
	TQRShape *QRShape68;
	TQRShape *QRShape69;
	TQRLabel *QRLabel97;
	TQRLabel *ColorGradeQRLabel2;
	TQRBand *QRBand4;
	TQRLabel *QRLabel101;
	TQRShape *QRShape71;
	TQRLabel *FrontNormalDirtySizeQRLabel2;
	TQRLabel *FrontEdgeDirtySizeQRLabel2;
	TQRLabel *FrontStainSizeQRLabel2;
	TQRLabel *FrontEdgeSizeQRLabel2;
	TQRLabel *FrontColorDirtySizeQRLabel2;
	TQRShape *QRShape72;
	TQRShape *QRShape73;
	TQRShape *QRShape74;
	TQRLabel *SideDirtySizeQRLabel2;
	TQRLabel *SideStainSizeQRLabel2;
	TQRLabel *ThreeDHeightPlusLimitQRLabel2;
	TQRLabel *OptionBreakingSizeQRLabel2;
  TQRLabel *OptionFrontStickingSizeType1QRLabel2;
	TQRShape *QRShape76;
	TQRLabel *QRLabel44;
	TQRLabel *SideColorDirtyGradeQRLabel2;
	TQRLabel *SideColorDirtySizeQRLabel2;
	TQRLabel *QRLabel49;
	TQRLabel *QRLabel52;
	TQRLabel *QRLabel54;
	TQRLabel *QRLabel57;
	TQRShape *QRShape10;
	TQRShape *QRShape24;
	TQRShape *QRShape77;
	TQRShape *QRShape78;
	TQRShape *QRShape79;
	TQRShape *QRShape80;
	TQRShape *QRShape81;
	TQRShape *QRShape82;
	TQRShape *QRShape83;
	TQRShape *QRShape84;
	TQRShape *QRShape88;
	TQRShape *QRShape89;
	TQRShape *QRShape90;
	TQRShape *QRShape92;
	TQRShape *QRShape99;
	TQRShape *QRShape100;
	TQRLabel *QRLabel17;
	TQRLabel *SideColorDirtyGradeQRLabel;
	TQRLabel *ThreeDHeightMinusLimitQRLabel;
	TQRLabel *ThreeDHeightPlusLimitQRLabel;
	TQRLabel *ThreeDHeightGradeQRLabel;
	TQRLabel *ThreeDHeightGradeQRLabel2;
  TQRShape *QRShape12;
  TQRShape *QRShape18;
  TQRShape *QRShape19;
  TQRLabel *QRLabel11;
  TQRLabel *QRLabel12;
  TQRLabel *SideEdgeNeighborIntensityLabel2;
  TQRLabel *SideEdgeNeighborSizeLabel2;
  TQRLabel *QRLabel22;
  TQRLabel *SideEdgeNeighborIntensityLabel3;
  TTntPanel *ReportPanel3;
  TQuickRep *QuickRep3;
  TQRBand *QRBand5;
  TQRShape *QRShape20;
  TQRLabel *QRLabel94;
  TQRLabel *QRLabel95;
  TQRLabel *QRLabel96;
  TQRLabel *QRLabel98;
  TQRLabel *QRLabel100;
  TQRLabel *QRLabel102;
  TQRLabel *QRLabel103;
  TQRLabel *QRLabel104;
  TQRLabel *QRLabel105;
  TQRShape *QRShape30;
  TQRShape *QRShape31;
  TQRShape *QRShape70;
  TQRLabel *FrontNormalDirtyGradeQRLabel3;
  TQRLabel *FrontPrintDirtyGradeQRLabel3;
  TQRLabel *FrontEdgeDirtyGradeQRLabel3;
  TQRLabel *FrontStainGradeQRLabel3;
  TQRLabel *OptionBreakingGradeQRLabel3;
  TQRLabel *SideDirtyGradeQRLabel3;
  TQRLabel *SideStainGradeQRLabel3;
  TQRLabel *QRLabel113;
  TQRLabel *QRLabel114;
  TQRLabel *OptionFrontStickingGradeType1QRLabel3;
  TQRLabel *QRLabel116;
  TQRLabel *OptionPrintMarkGradeQRLabel3;
  TQRLabel *QRLabel119;
  TQRLabel *FrontColorDirtyGradeQRLabel3;
  TQRLabel *QRLabel121;
  TQRLabel *FrontEdgeStainGradeQRLabel3;
  TQRLabel *PrintEraseGradeQRLabel3;
  TQRLabel *QRLabel124;
  TQRLabel *ColorGradeQRLabel3;
  TQRLabel *QRLabel138;
  TQRLabel *QRLabel139;
  TQRLabel *QRLabel140;
  TQRLabel *QRLabel141;
  TQRShape *Report3VerShape1;
  TQRShape *Report3VerShape2;
  TQRShape *QRShape102;
  TQRShape *Report3VerShape3;
  TQRShape *Report3VerShape4;
  TQRShape *Report3VerShape5;
  TQRShape *Report3VerShape6;
  TQRShape *Report3VerShape8;
  TQRShape *Report3VerShape9;
  TQRShape *Report3VerShape10;
  TQRShape *Report3VerShape11;
  TQRLabel *QRLabel144;
  TQRLabel *SideColorDirtyGradeQRLabel3;
  TQRLabel *ThreeDHeightMinusLimitQRLabel3;
  TQRLabel *ThreeDHeightPlusLimitQRLabel3;
  TQRLabel *ThreeDHeightGradeQRLabel3;
  TQRShape *QRShape115;
  TQRLabel *QRLabel149;
  TQRLabel *SideEdgeNeighborIntensityLabel4;
  TQRBand *QRBand6;
  TQRLabel *QRLabel152;
  TTntPanel *ReportPanel4;
  TQuickRep *QuickRep4;
  TQRBand *QRBand7;
  TQRShape *QRShape116;
  TQRLabel *QRLabel174;
  TQRLabel *QRLabel178;
  TQRLabel *QRLabel179;
  TQRLabel *QRLabel180;
  TQRLabel *QRLabel181;
  TQRLabel *QRLabel182;
  TQRLabel *QRLabel183;
  TQRLabel *QRLabel184;
  TQRLabel *QRLabel185;
  TQRLabel *QRLabel186;
  TQRLabel *QRLabel187;
  TQRLabel *QRLabel188;
  TQRLabel *QRLabel189;
  TQRShape *Report4VerShape1;
  TQRShape *Report4VerShape2;
  TQRShape *QRShape133;
  TQRShape *Report4VerShape3;
  TQRShape *Report4VerShape4;
  TQRShape *Report4VerShape5;
  TQRShape *QRShape141;
  TQRShape *QRShape142;
  TQRShape *QRShape143;
  TQRLabel *FrontNormalDirtyGradeQRLabel4;
  TQRLabel *FrontPrintDirtyGradeQRLabel4;
  TQRLabel *FrontEdgeDirtyGradeQRLabel4;
  TQRLabel *FrontStainGradeQRLabel4;
  TQRLabel *OptionBreakingGradeQRLabel4;
  TQRLabel *SideDirtyGradeQRLabel4;
  TQRLabel *SideStainGradeQRLabel4;
  TQRLabel *ThreeDHeightGradeQRLabel4;
  TQRShape *Report4VerShape7;
  TQRLabel *QRLabel200;
  TQRLabel *QRLabel201;
  TQRLabel *OptionFrontStickingGradeType1QRLabel4;
  TQRLabel *QRLabel203;
  TQRLabel *OptionPrintMarkGradeQRLabel4;
  TQRShape *Report4VerShape9;
  TQRLabel *QRLabel206;
  TQRLabel *FrontColorDirtyGradeQRLabel4;
  TQRLabel *QRLabel208;
  TQRLabel *FrontEdgeStainGradeQRLabel4;
  TQRLabel *PrintEraseGradeQRLabel4;
  TQRShape *QRShape148;
  TQRShape *Report4VerShape10;
  TQRLabel *QRLabel211;
  TQRLabel *ColorGradeQRLabel4;
  TQRShape *QRShape150;
  TQRLabel *FrontNormalDirtySizeQRLabel4;
  TQRLabel *FrontEdgeDirtySizeQRLabel4;
  TQRLabel *FrontStainSizeQRLabel4;
  TQRLabel *FrontEdgeSizeQRLabel4;
  TQRLabel *FrontColorDirtySizeQRLabel4;
  TQRShape *QRShape151;
  TQRShape *QRShape152;
  TQRShape *QRShape153;
  TQRLabel *SideDirtySizeQRLabel4;
  TQRLabel *SideStainSizeQRLabel4;
  TQRLabel *ThreeDHeightPlusLimitQRLabel4;
  TQRLabel *OptionFrontStickingSizeType1QRLabel4;
  TQRShape *Report4VerShape11;
  TQRLabel *QRLabel224;
  TQRLabel *SideColorDirtyGradeQRLabel4;
  TQRLabel *SideColorDirtySizeQRLabel4;
  TQRLabel *ThreeDHeightMinusLimitQRLabel4;
  TQRLabel *OptionBreakingSizeQRLabel4;
  TQRLabel *QRLLABEL11;
  TQRLabel *QRLabel230;
  TQRLabel *SideEdgeNeighborIntensityLabel1;
  TQRLabel *SideEdgeNeighborSizeLabel1;
  TQRBand *QRBand8;
  TQRLabel *QRLabel234;
  TCheckBox *PrintDefectSeriesCheckBox;
      
  TGroupBox *GroupBox3;
  TPanel *Panel2;
  TStaticText *StaticText2;
  TStaticText *ReportPageLabel;
  TUpDown *UpDown1;
        TTntGroupBox *GroupBox4;
        TTntButton *SelectDefectImageButton;
        TTntPanel *ReportPanel5;
        TQuickRep *QuickRep5;
        TQRBand *QRBand9;
        TQRLabel *QRLabel122;
        TQRBand *QRBand10;
        TQRShape *QRImageFrame2;
        TQRShape *QRImageFrame3;
        TQRShape *QRImageFrame4;
        TQRShape *QRImageFrame5;
        TQRShape *QRImageFrame6;
        TQRShape *QRImageFrame7;
        TQRShape *QRImageFrame10;
        TQRShape *QRImageFrame1;
        TQRShape *QRImageFrame8;
        TQRShape *QRImageFrame9;
        TQRShape *QRImageFrame11;
        TQRShape *QRImageFrame12;
        TQRShape *QRImageFrame13;
        TQRShape *QRImageFrame14;
        TQRShape *QRImageFrame15;
        TQRShape *QRImageFrame16;
        TQRLabel *QRDefectNameLabel1;
        TQRLabel *QRDefectSizeLabel1;
        TQRLabel *QRDefectNameContent1;
        TQRLabel *QRDefectSizeContent1;
        TQRImage *QRImage1;
        TQRImage *QRImage2;
        TQRImage *QRImage3;
        TQRImage *QRImage4;
        TQRImage *QRImage5;
        TQRImage *QRImage6;
        TQRLabel *QRDefectNameLabel2;
        TQRLabel *QRDefectSizeLabel2;
        TQRLabel *QRDefectNameContent2;
        TQRLabel *QRDefectSizeContent2;
        TQRLabel *QRDefectNameLabel3;
        TQRLabel *QRDefectSizeLabel3;
        TQRLabel *QRDefectNameContent3;
        TQRLabel *QRDefectSizeContent3;
        TQRLabel *QRDefectNameLabel4;
        TQRLabel *QRDefectSizeLabel4;
        TQRLabel *QRDefectNameContent4;
        TQRLabel *QRDefectSizeContent4;
        TQRLabel *QRDefectNameLabel5;
        TQRLabel *QRDefectSizeLabel5;
        TQRLabel *QRDefectNameContent5;
        TQRLabel *QRDefectSizeContent5;
        TQRLabel *QRDefectNameLabel6;
        TQRLabel *QRDefectSizeLabel6;
        TQRLabel *QRDefectNameContent6;
        TQRLabel *QRDefectSizeContent6;
        TCheckBox *DefectImagePrintCheckBox;
        TQRCompositeReport *QRCompositeReport1;//
  TQRLabel *QRPageDfImage0;
  TTntPanel *ReportPanel6;
  TQuickRep *QuickRep6;
  TQRBand *QRBand11;
  TQRBand *QRBand12;
  TQRShape *QRDefectInfoShape1;
  TQRShape *QRDefectInfoShape7;
  TQRShape *QRDefectInfoShape8;
  TQRShape *QRDefectInfoShape9;
  TQRShape *QRDefectInfoShape10;
  TQRShape *QRDefectInfoShape2;
  TQRShape *QRDefectInfoShape11;
  TQRShape *QRDefectInfoShape12;
  TQRShape *QRDefectInfoShape6;
  TQRLabel *QRItemLabelTitle1;
  TQRLabel *QRQuantityLabelTitle1;
  TQRShape *QRDefectInfoShape4;
  TQRShape *QRDefectInfoShape5;
  TQRShape *QRDefectInfoShape3;
  TQRLabel *QRRateLabelTitle1;
  TQRLabel *QRItemLabelTitle2;
  TQRLabel *QRQuantityLabelTitle2;
  TQRLabel *QRRateLabelTitle2;
  TQRShape *QRDefectInfoShape13;
  TQRShape *QRDefectInfoShape14;
  TQRShape *QRDefectInfoShape15;
  TQRShape *QRDefectInfoShape16;
  TQRShape *QRDefectInfoShape21;
  TQRChart *QRInspectionChart;
  TQRDBChart *QRInspectionChartDB;
  TBarSeries *Series1;
  TQRLabel *QRItemLabel1;
  TQRLabel *QRQuantityLabel1;
  TQRLabel *QRRateLabel1;
  TQRLabel *QRItemLabel14;
  TQRLabel *QRQuantityLabel14;
  TQRLabel *QRRateLabel14;
  TQRLabel *QRItemLabel2;
  TQRLabel *QRItemLabel3;
  TQRLabel *QRItemLabel4;
  TQRLabel *QRItemLabel5;
  TQRLabel *QRItemLabel6;
  TQRLabel *QRItemLabel7;
  TQRLabel *QRItemLabel8;
  TQRLabel *QRItemLabel9;
  TQRLabel *QRItemLabel10;
  TQRLabel *QRItemLabel11;
  TQRLabel *QRItemLabel12;
  TQRLabel *QRItemLabel13;
  TQRLabel *QRItemLabel15;
  TQRLabel *QRItemLabel16;
  TQRLabel *QRItemLabel17;
  TQRLabel *QRItemLabel18;
  TQRLabel *QRItemLabel19;
  TQRLabel *QRItemLabel20;
  TQRLabel *QRItemLabelTotal;
  TQRLabel *QRQuantityLabel2;
  TQRLabel *QRQuantityLabel3;
  TQRLabel *QRQuantityLabel4;
  TQRLabel *QRQuantityLabel5;
  TQRLabel *QRQuantityLabel6;
  TQRLabel *QRQuantityLabel7;
  TQRLabel *QRQuantityLabel8;
  TQRLabel *QRQuantityLabel9;
  TQRLabel *QRQuantityLabel10;
  TQRLabel *QRQuantityLabel11;
  TQRLabel *QRQuantityLabel12;
  TQRLabel *QRQuantityLabel13;
  TQRLabel *QRQuantityLabel15;
  TQRLabel *QRQuantityLabel16;
  TQRLabel *QRQuantityLabel17;
  TQRLabel *QRQuantityLabel18;
  TQRLabel *QRQuantityLabel19;
  TQRLabel *QRQuantityLabel20;
  TQRLabel *QRQuantityLabelTotal;
  TQRLabel *QRRateLabel2;
  TQRLabel *QRRateLabel3;
  TQRLabel *QRRateLabel4;
  TQRLabel *QRRateLabel5;
  TQRLabel *QRRateLabel6;
  TQRLabel *QRRateLabel7;
  TQRLabel *QRRateLabel8;
  TQRLabel *QRRateLabel9;
  TQRLabel *QRRateLabel10;
  TQRLabel *QRRateLabel11;
  TQRLabel *QRRateLabel12;
  TQRLabel *QRRateLabel13;
  TQRLabel *QRRateLabel15;
  TQRLabel *QRRateLabel16;
  TQRLabel *QRRateLabel17;
  TQRLabel *QRRateLabel18;
  TQRLabel *QRRateLabel19;
  TQRLabel *QRRateLabel20;
  TQRLabel *QRRateLabelTotal;
  TQRLabel *QRSignatureDone6;
  TQRLabel *QRSignatureCheck6;
  TQRLabel *QRSignatureReview6;
  TQRLabel *QRSignatureDate16;
  TQRLabel *QRSignatureDate26;
  TQRLabel *QRSignatureDate36;
  TQRLabel *QRSignaturePage6;
  TQRLabel *QRPage2Title;
  TQRLabel *QRChartLabel;
  TQRLabel *QRInspectionSpeedLabel;
  TQRChart *ThroughputChart;
  TQRDBChart *ThroughputChartDB;
  TLineSeries *Series2;
  TQRShape *QRShape168;
  TQRShape *QRShape169;
  TQRShape *QRShape170;
  TQRShape *QRShape171;
  TQRLabel *QRLabel107;
  TQRLabel *QRLabel108;
  TQRLabel *AvgSpeedLabel;
  TQRLabel *MaxSpeedLabel;
  TCheckBox *CalGoodRateOptionBox;
  TCheckBox *RemoveGradeInfoOptionBox;
  TQRBand *QRBand13;
  TQRLabel *QRLabel7;
  TQRLabel *QRLabel13;
  TQRLabel *QRLabel6;
  TQRLabel *OperatorQRLabel;
  TQRLabel *EndTimeQRLabel;
  TQRLabel *EndDateQRLabel;
  TQRLabel *QRLabel20;
  TQRLabel *QRLabel5;
  TQRLabel *StartDateQRLabel;
  TQRLabel *StartTimeQRLabel;
  TQRLabel *ProductionQRLabel;
  TQRLabel *QRLabel4;
  TQRLabel *QRLabel2;
  TQRLabel *QRRichText0;
  TQRLabel *ProductQRLabel1;
  TQRLabel *QRLabel3;
  TQRShape *QRShape1;
  TQRShape *QRShape14;
  TQRShape *QRShape16;
  TQRShape *QRShape2;
  TQRShape *QRShape15;
  TQRShape *QRShape17;
  TQRShape *QRShape21;
  TQRShape *QRShape11;
  TQRBand *QRBand15;
  TQRLabel *QRLabel40;
  TQRLabel *QRLabel35;
  TQRLabel *ProductQRLabel2;
  TQRLabel *QRLabel50;
  TQRLabel *QRRichText2;
  TQRLabel *ProductionQRLabel2;
  TQRLabel *QRLabel51;
  TQRLabel *QRLabel39;
  TQRLabel *StartDateQRLabel2;
  TQRLabel *StartTimeQRLabel2;
  TQRLabel *EndTimeQRLabel2;
  TQRLabel *EndDateQRLabel2;
  TQRLabel *QRLabel60;
  TQRLabel *QRLabel53;
  TQRLabel *OperatorQRLabel2;
  TQRLabel *QRLabel90;
  TQRShape *QRShape39;
  TQRShape *QRShape42;
  TQRShape *QRShape40;
  TQRShape *QRShape45;
  TQRShape *QRShape41;
  TQRShape *QRShape46;
  TQRShape *QRShape50;
  TQRShape *QRShape66;
  TQRBand *QRBand17;
  TQRLabel *QRLabel155;
  TQRLabel *QRLabel153;
  TQRLabel *QRLabel165;
  TQRLabel *QRRichText3;
  TQRLabel *ProductQRLabel4;
  TQRLabel *ProductionQRLabel4;
  TQRLabel *QRLabel166;
  TQRLabel *QRLabel154;
  TQRLabel *StartDateQRLabel4;
  TQRLabel *StartTimeQRLabel4;
  TQRLabel *EndTimeQRLabel4;
  TQRLabel *EndDateQRLabel4;
  TQRLabel *QRLabel175;
  TQRLabel *QRLabel168;
  TQRLabel *OperatorQRLabel4;
  TQRLabel *QRLabel205;
  TQRShape *QRShape119;
  TQRShape *QRShape122;
  TQRShape *QRShape130;
  TQRShape *QRShape146;
  TQRShape *QRShape126;
  TQRShape *QRShape121;
  TQRShape *QRShape125;
  TQRShape *QRShape120;
  TQRBand *QRBand20;
  TQRLabel *QRLabel75;
  TQRLabel *QRLabel46;
  TQRLabel *ProductQRLabel3;
  TQRLabel *QRLabel78;
  TQRLabel *QRRichText1;
  TQRLabel *ProductionQRLabel3;
  TQRLabel *QRLabel79;
  TQRLabel *QRLabel62;
  TQRLabel *StartDateQRLabel3;
  TQRLabel *StartTimeQRLabel3;
  TQRLabel *EndTimeQRLabel3;
  TQRLabel *EndDateQRLabel3;
  TQRLabel *QRLabel87;
  TQRLabel *QRLabel81;
  TQRLabel *OperatorQRLabel3;
  TQRLabel *QRLabel118;
  TQRShape *QRShape22;
  TQRShape *QRShape26;
  TQRShape *QRShape23;
  TQRShape *QRShape27;
  TQRShape *QRShape25;
  TQRShape *QRShape28;
  TQRShape *QRShape29;
  TQRShape *QRShape75;
  TQRShape *QRShape172;
  TQRLabel *SideNLabel1;
  TQRLabel *SideEdgeDarkIntensityLabel3;
  TQRLabel *SideNLabel2;
  TQRLabel *SideEdgeBreakIntensityLabel3;
  TQRShape *QRShape173;
  TQRLabel *SideNLabel3;
  TQRLabel *SideEdgeDarkIntensityLabel2;
  TQRLabel *SideEdgeDarkSizeLabel2;
  TQRLabel *SideNLabel4;
  TQRLabel *SideEdgeBreakIntensityLabel2;
  TQRLabel *SideEdgeBreakSizeLabel2;
  TQRShape *Report3VerShape7;
  TQRLabel *SideNLabel5;
  TQRLabel *SideEdgeDarkIntensityLabel4;
  TQRLabel *SideNLabel6;
  TQRLabel *SideEdgeBreakIntensityLabel4;
  TQRShape *Report4VerShape8;
  TQRLabel *SideNLabel7;
  TQRLabel *SideEdgeDarkIntensityLabel1;
  TQRLabel *SideEdgeDarkSizeLabel1;
  TQRLabel *SideNLabel8;
  TQRLabel *SideEdgeBreakIntensityLabel1;
  TQRLabel *SideEdgeBreakSizeLabel1;
  TQRLabel *SideEdgeBrightIntensityLabel1;
  TQRLabel *SideEdgeBrightSizeLabel1;
  TQRLabel *SideEdgeBrightIntensityLabel2;
  TQRLabel *SideEdgeBrightSizeLabel2;
  TQRLabel *SideEdgeBrightIntensityLabel3;
  TQRLabel *SideEdgeBrightIntensityLabel4;
  TQRLabel *GradeNameLabel1;
  TQRLabel *PrintSpreadLabel1;
  TQRLabel *GradeNameLabel2;
  TQRLabel *PrintSpreadLabel2;
  TQRLabel *GradeNameLabel3;
  TQRLabel *PrintSpreadLabel3;
  TQRLabel *GradeNameLabel4;
  TQRLabel *PrintSpreadLabel4;
  TQRLabel *EngraveDefectCheckGradeTitleLabel1;
  TQRLabel *EngraveDefectCheckGradeValueLabel1;
  TQRLabel *EngraveDefectCheckGradeTitleLabel2;
  TQRLabel *EngraveDefectCheckGradeValueLabel2;
  TQRLabel *EngraveDefectCheckGradeTitleLabel3;
  TQRLabel *EngraveDefectCheckGradeValueLabel3;
  TQRLabel *EngraveDefectCheckGradeTitleLabel4;
  TQRLabel *EngraveDefectCheckGradeValueLabel4;
  TTimer *Timer1;
  TCheckBox *CheckBox1;
  TCheckBox *CheckBox2;
  TTntGroupBox *OptionGroupBox;
  TCheckBox *CheckBox3;
  TQRLabel *OptionFrontStickingGradeType2QRLabel3;
  TQRShape *Report4VerShape6;
  TQRLabel *OptionFrontStickingGradeType2QRLabel4;
  TQRLabel *OptionFrontStickingSizeType2QRLabel4;
  TQRLabel *OptionFrontStickingGradeType2QRLabel;
  TQRLabel *OptionFrontStickingGradeType2QRLabel2;
  TQRLabel *OptionFrontStickingSizeType2QRLabel2;
  TTntLabel *DefectImagePrintLabel;
  TCheckBox *CheckBox4;
	TQRBand *QRBand14;
	TQRShape *QRShape3;
	TQRLabel *RPassCntQRLabel;
	TQRLabel *RDefectCntQRLabel;
	TQRLabel *DefectCntQRLabel;
	TQRLabel *TotalCntQRLabel;
	TQRLabel *PassCntQRLabel;
	TQRLabel *QRLabel33;
	TQRLabel *QRLabel9;
	TQRLabel *QRLabel10;
	TQRLabel *QRLabel61;
	TQRLabel *QRLabel47;
	TQRLabel *QRLabel48;
	TQRLabel *QRLabel8;
	TQRShape *QRShape8;
	TQRShape *QRShape5;
	TQRShape *QRShape9;
	TQRShape *QRShape7;
	TQRShape *QRShape6;
	TQRShape *QRShape4;
	TQRShape *QRShape85;
	TQRLabel *QRLabel15;
	TQRLabel *UninsCntQRLabel;
	TQRBand *QRBand16;
	TQRShape *QRShape37;
	TQRLabel *QRLabel41;
	TQRLabel *QRLabel58;
	TQRLabel *QRLabel55;
	TQRLabel *TotalCntQRLabel2;
	TQRLabel *QRLabel42;
	TQRLabel *PassCntQRLabel2;
	TQRLabel *DefectCntQRLabel2;
	TQRLabel *QRLabel43;
	TQRLabel *QRLabel83;
	TQRLabel *RDefectCntQRLabel2;
	TQRLabel *RPassCntQRLabel2;
	TQRLabel *QRLabel56;
	TQRShape *QRShape49;
	TQRShape *QRShape47;
	TQRShape *QRShape38;
	TQRShape *QRShape44;
	TQRShape *QRShape43;
	TQRShape *QRShape48;
	TQRShape *QRShape98;
	TQRLabel *QRLabel21;
	TQRLabel *UninsCntQRLabel2;
	TQRBand *QRBand22;
	TQRLabel *QRSignaturePage3;
	TQRLabel *QRSignatureDate33;
	TQRLabel *QRSignatureReview3;
	TQRLabel *QRSignatureDate23;
	TQRLabel *QRSignatureCheck3;
	TQRLabel *QRSignatureDate13;
	TQRLabel *QRSignatureDone3;
	TQRShape *QRShape156;
	TQRShape *QRShape87;
	TQRLabel *QRLabel128;
	TQRLabel *QRLabel135;
	TQRLabel *QRLabel137;
	TQRLabel *TotalCntQRLabel3;
	TQRLabel *PassCntQRLabel3;
	TQRLabel *DefectCntQRLabel3;
	TQRLabel *RDefectCntQRLabel3;
	TQRLabel *RPassCntQRLabel3;
	TQRLabel *QRLabel136;
	TQRLabel *QRLabel142;
	TQRLabel *QRLabel130;
	TQRLabel *QRLabel129;
	TQRShape *QRShape97;
	TQRShape *QRShape96;
	TQRShape *QRShape93;
	TQRShape *QRShape94;
	TQRShape *QRShape91;
	TQRShape *QRShape95;
	TQRLabel *DefectSeriesLabel11;
	TQRLabel *DefectSeriesLabel22;
	TQRLabel *bDefectNameLabel1;
	TQRLabel *bDefectNameLabel2;
	TQRLabel *bDefectNameLabel3;
	TQRLabel *bDefectNameLabel4;
	TQRLabel *bDefectNameLabel5;
	TQRLabel *bDefectCountLabel5;
	TQRLabel *bDefectCountLabel4;
	TQRLabel *bDefectCountLabel3;
	TQRLabel *bDefectCountLabel2;
	TQRLabel *bDefectCountLabel1;
	TQRLabel *DefectSeriesLabel33;
	TQRLabel *DefectSeriesLabel44;
	TQRLabel *bDefectRatioLabel1;
	TQRLabel *bDefectRatioLabel3;
	TQRLabel *bDefectRatioLabel2;
	TQRLabel *bDefectRatioLabel4;
	TQRLabel *bDefectRatioLabel5;
	TQRLabel *bDefectNameLabel9;
	TQRLabel *bDefectNameLabel10;
	TQRLabel *bDefectNameLabel8;
	TQRLabel *bDefectNameLabel7;
	TQRLabel *bDefectNameLabel6;
	TQRLabel *DefectSeriesLabel55;
	TQRLabel *DefectSeriesLabel66;
	TQRLabel *DefectSeriesLabel77;
	TQRLabel *bDefectCountLabel6;
	TQRLabel *bDefectRatioLabel6;
	TQRLabel *bDefectRatioLabel7;
	TQRLabel *bDefectCountLabel7;
	TQRLabel *bDefectCountLabel8;
	TQRLabel *bDefectRatioLabel8;
	TQRLabel *bDefectRatioLabel9;
	TQRLabel *bDefectCountLabel9;
	TQRLabel *bDefectCountLabel10;
	TQRLabel *bDefectRatioLabel10;
	TQRShape *QRShape167;
	TQRShape *QRShape166;
	TQRShape *QRShape165;
	TQRShape *QRShape164;
	TQRShape *QRShape163;
	TQRShape *QRShape162;
	TQRShape *QRShape161;
	TQRShape *QRShape160;
	TQRShape *QRShape159;
	TQRShape *QRShape158;
	TQRShape *QRShape157;
	TQRShape *QRShape86;
	TQRLabel *QRLabel14;
	TQRLabel *UninsCntQRLabel3;
	TQRBand *QRBand18;
	TQRLabel *QRSignaturePage4;
	TQRLabel *QRSignatureDate34;
	TQRLabel *QRSignatureReview4;
	TQRLabel *QRSignatureDate24;
	TQRLabel *QRSignatureCheck4;
	TQRLabel *QRSignatureDate14;
	TQRLabel *QRSignatureDone4;
	TQRShape *QRShape117;
	TQRShape *DefectSeriesShape1;
	TQRLabel *DefectSeriesLabel1;
	TQRLabel *DefectSeriesLabel2;
	TQRLabel *DefectNameLabel1;
	TQRLabel *DefectNameLabel2;
	TQRLabel *DefectNameLabel3;
	TQRLabel *DefectNameLabel4;
	TQRLabel *DefectNameLabel5;
	TQRLabel *DefectCountLabel5;
	TQRLabel *DefectCountLabel4;
	TQRLabel *DefectCountLabel3;
	TQRLabel *DefectCountLabel2;
	TQRLabel *DefectCountLabel1;
	TQRLabel *DefectRatioLabel1;
	TQRLabel *DefectRatioLabel2;
	TQRLabel *DefectRatioLabel3;
	TQRLabel *DefectRatioLabel4;
	TQRLabel *DefectRatioLabel5;
	TQRLabel *DefectNameLabel10;
	TQRLabel *DefectNameLabel9;
	TQRLabel *DefectNameLabel8;
	TQRLabel *DefectNameLabel7;
	TQRLabel *DefectNameLabel6;
	TQRLabel *DefectSeriesLabel5;
	TQRLabel *DefectSeriesLabel6;
	TQRLabel *DefectCountLabel6;
	TQRLabel *DefectCountLabel7;
	TQRLabel *DefectCountLabel8;
	TQRLabel *DefectCountLabel9;
	TQRLabel *DefectCountLabel10;
	TQRLabel *DefectRatioLabel10;
	TQRLabel *DefectRatioLabel9;
	TQRLabel *DefectRatioLabel8;
	TQRLabel *DefectRatioLabel7;
	TQRLabel *DefectRatioLabel6;
	TQRLabel *DefectSeriesLabel7;
	TQRLabel *DefectSeriesLabel3;
	TQRLabel *DefectSeriesLabel4;
	TQRShape *DefectSeriesShape2;
	TQRShape *DefectSeriesShape3;
	TQRShape *DefectSeriesShape8;
	TQRShape *DefectSeriesShape4;
	TQRShape *DefectSeriesShape5;
	TQRShape *DefectSeriesShape9;
	TQRShape *DefectSeriesShape6;
	TQRShape *DefectSeriesShape7;
	TQRShape *DefectSeriesShape10;
	TQRShape *DefectSeriesShape11;
	TQRLabel *TotalCntQRLabel4;
	TQRLabel *RPassCntQRLabel4;
	TQRLabel *RDefectCntQRLabel4;
	TQRShape *QRShape129;
	TQRShape *QRShape128;
	TQRShape *QRShape127;
	TQRShape *QRShape124;
	TQRShape *QRShape123;
	TQRShape *QRShape118;
	TQRLabel *QRLabel198;
	TQRLabel *QRLabel173;
	TQRLabel *QRLabel171;
	TQRLabel *QRLabel170;
	TQRLabel *QRLabel158;
	TQRLabel *QRLabel157;
	TQRLabel *QRLabel156;
	TQRLabel *PassCntQRLabel4;
	TQRLabel *DefectCntQRLabel4;
	TQRShape *QRShape101;
	TQRLabel *QRLabel28;
	TQRLabel *UninsCntQRLabel4;
	void __fastcall FormCreate(TObject *Sender);
	void __fastcall PrintPreviewButtonClick(TObject *Sender);
    void __fastcall CancelButtonClick(TObject *Sender);
    void __fastcall PrintButtonClick(TObject *Sender);
    void __fastcall PrinterSetupButtonClick(TObject *Sender);
	void __fastcall PrintGradeOnlyRadioButtonClick(TObject *Sender);
	void __fastcall PrintGradeAndSizeRadioButtonClick(TObject *Sender);
  void __fastcall PrintDefectSeriesCheckBoxClick(TObject *Sender);
  void __fastcall UpDown1Click(TObject *Sender, TUDBtnType Button);
  void __fastcall RefreshDefectsInfo(int totalDefectCount);
        void __fastcall SelectDefectImageButtonClick(TObject *Sender);
        void __fastcall DefectImagePrintCheckBoxClick(TObject *Sender);
        void __fastcall QRCompositeReport1AddReports(TObject *Sender);
  void __fastcall TntFormActivate(TObject *Sender);
  void __fastcall CalGoodRateOptionBoxClick(TObject *Sender);
  void __fastcall GroupBox1DblClick(TObject *Sender);
  void __fastcall RemoveGradeInfoOptionBoxClick(TObject *Sender);
  void __fastcall Timer1Timer(TObject *Sender);
  void __fastcall CheckBox1Click(TObject *Sender);
  void __fastcall CheckBox2Click(TObject *Sender);
  void __fastcall CheckBox3Click(TObject *Sender);
  void __fastcall Panel1DblClick(TObject *Sender);
  void __fastcall DefectImagePrintLabelClick(TObject *Sender);
  void __fastcall CheckBox4Click(TObject *Sender);

private:	// User declarations
  void __fastcall SetThroughtputChart(WideString productName, WideString lotName);
  
	WideString ProductName;
	WideString LOTName;
	//TTabletInspectReport TabletInspectReport;
	//TTabletInspectGradeData TabletInspectGradeData;
  NFA_INSPECTION_REPORT_STRUCT Report;
	bool PrintSize;
  bool bYuhanOption;

  int DefectSeriesCount[MAX_DEFECT_SERIES_COUNT + 1];
  TPrintDefectImageInfo PrintImageIndex;

  TTntStringList *PageList;

  void __fastcall UpdateTotalReportPages(int option);
  void __fastcall PrintImageIndexLoad();
  void __fastcall CreateNewDefectImagePage();
  void __fastcall FillDefectImageReport(WideString productName, WideString lotName, int displayCnt);
  WideString __fastcall GetDefectContainerFileName(int defectIndex, WideString productName, WideString lotName);
public:		// User declarations
  int newImagePageIndex;
	__fastcall TPrintInspectionResultForm(TComponent* Owner);
    void __fastcall SetReport(WideString productName, WideString lotName,
  NFA_INSPECTION_REPORT_STRUCT REPORT, bool isPrintedTablet,int printModeOption, int threeDHeightOption, bool hIprogram);
  void __fastcall TPrintInspectionResultForm::SaveRefDefectIndex(int *Index);
  void __fastcall SetDefectInfoPage2();
  void __fastcall SetDetailReportOption(bool On , int TotalRP);
  void __fastcall SetDetailReportOptionGridShape(bool On);
  void __fastcall GetDefalutString();
  void __fastcall DisplayReportPanelOption1(bool switchVal);
  void __fastcall DisplayReportPanelOption2(bool switchVal);
  void __fastcall DisplayReportPanelOption3(bool switchVal);
  void __fastcall DisplayReportPanelOption4(bool switchVal);

  int Zorder;
  int globalIsPrintedTablet;

  AnsiString MachineName;
};
//---------------------------------------------------------------------------
extern PACKAGE TPrintInspectionResultForm *PrintInspectionResultForm;
//---------------------------------------------------------------------------
#endif

