object DMDataBase: TDMDataBase OldCreateOrder = False OnCreate = DataModuleCreate OnDestroy = DataModuleDestroy Left = 942 Top = 89 Height = 625 Width = 498 object atBills: TADOTable CursorType = ctStatic TableName = 'Bills' Left = 34 Top = 42 end object atDrawingQuantity: TADOTable CursorType = ctStatic TableName = 'DrawingQuantity' Left = 172 Top = 39 end object dspBills: TDataSetProvider DataSet = atBills UpdateMode = upWhereKeyOnly Left = 34 Top = 114 end object dspDrawingQuantity: TDataSetProvider DataSet = atDrawingQuantity UpdateMode = upWhereKeyOnly Left = 172 Top = 111 end object cdsBills: TClientDataSet Aggregates = <> Params = <> ProviderName = 'dspBills' AfterOpen = cdsBillsAfterOpen AfterInsert = cdsBillsAfterInsert AfterPost = cdsBillsAfterPost Left = 33 Top = 193 object cdsBillsID: TIntegerField FieldName = 'ID' end object cdsBillsParentID: TIntegerField FieldName = 'ParentID' end object cdsBillsNextSiblingID: TIntegerField FieldName = 'NextSiblingID' end object cdsBillsCode: TWideStringField FieldName = 'Code' OnChange = cdsOrgBillsCodeChange Size = 50 end object cdsBillsName: TWideStringField FieldName = 'Name' OnChange = cdsOrgBillsCodeChange Size = 128 end object cdsBillsUnits: TWideStringField FieldName = 'Units' Size = 50 end object cdsBillsQuantity: TFloatField FieldName = 'Quantity' end object cdsBillsUnitPrice: TBCDField FieldName = 'UnitPrice' Precision = 19 end object cdsBillsTotalPrice: TBCDField FieldName = 'TotalPrice' Precision = 19 end object cdsBillsB_Code: TWideStringField FieldName = 'B_Code' OnChange = cdsOrgBillsCodeChange Size = 255 end object cdsBillsDesignQuantity: TFloatField FieldName = 'DesignQuantity' end object cdsBillsDesignQuantity2: TFloatField FieldName = 'DesignQuantity2' end object cdsBillsDesignPrice: TFloatField FieldName = 'DesignPrice' end object cdsBillsMemoStr: TMemoField FieldName = 'MemoStr' BlobType = ftMemo end object cdsBillsIsPreDefine: TBooleanField FieldName = 'IsPreDefine' end object cdsBillsSelected: TBooleanField FieldName = 'Selected' end object cdsBillsCustomValue: TFloatField FieldName = 'CustomValue' end object cdsBillsSerialNo: TIntegerField FieldName = 'SerialNo' end object cdsBillsLostNextSiblingCount: TIntegerField FieldName = 'LostNextSiblingCount' OnChange = cdsBillsLostNextSiblingCountChange end object cdsBillsLostChildrenCount: TIntegerField FieldName = 'LostChildrenCount' OnChange = cdsBillsLostNextSiblingCountChange end object cdsBillsLostPreSiblingCount: TIntegerField FieldName = 'LostPreSiblingCount' OnChange = cdsBillsLostNextSiblingCountChange end object cdsBillsUserModified: TBooleanField FieldName = 'UserModified' OnChange = cdsBillsLostNextSiblingCountChange end object cdsBillsIsIgNore: TBooleanField FieldName = 'IsIgNore' OnChange = cdsBillsLostNextSiblingCountChange end object cdsBillsDeductGrade: TFloatField FieldName = 'DeductGrade' OnChange = cdsBillsLostNextSiblingCountChange end object cdsBillsStandardGrade: TFloatField FieldName = 'StandardGrade' OnChange = cdsBillsLostNextSiblingCountChange end object cdsBillsIsSuperscale: TBooleanField FieldName = 'IsSuperscale' OnChange = cdsBillsLostNextSiblingCountChange end object cdsBillsErrorHint: TWideStringField FieldName = 'ErrorHint' OnChange = cdsBillsLostNextSiblingCountChange Size = 255 end object cdsBillsNameErrorFlag: TIntegerField FieldName = 'NameErrorFlag' OnChange = cdsBillsLostNextSiblingCountChange end object cdsBillsUnitsErrorFlag: TIntegerField FieldName = 'UnitsErrorFlag' OnChange = cdsBillsLostNextSiblingCountChange end object cdsBillsChapterID: TIntegerField FieldName = 'ChapterID' end object cdsBillsFullCode: TWideStringField FieldName = 'FullCode' Size = 128 end object cdsBillsRightName: TWideStringField FieldName = 'RightName' Size = 255 end object cdsBillsRightUnits: TWideStringField FieldName = 'RightUnits' Size = 255 end object cdsBillsIsLeaf: TBooleanField FieldName = 'IsLeaf' end object cdsBillsIsCreatePriceAnalysis: TBooleanField FieldName = 'IsCreatePriceAnalysis' end object cdsBillsB_CodeAlpha: TWideStringField FieldName = 'B_CodeAlpha' Size = 255 end object cdsBillsIsAccQuantity: TBooleanField FieldName = 'IsAccQuantity' end object cdsBillsDrawingCode: TWideStringField FieldName = 'DrawingCode' Size = 50 end end object cdsDrawingQuantity: TClientDataSet Aggregates = <> Params = <> ProviderName = 'dspDrawingQuantity' AfterOpen = cdsDrawingQuantityAfterOpen AfterInsert = cdsDrawingQuantityAfterInsert Left = 172 Top = 190 object cdsDrawingQuantityID: TIntegerField FieldName = 'ID' end object cdsDrawingQuantityName: TWideStringField FieldName = 'Name' Size = 200 end object cdsDrawingQuantityUnits: TWideStringField FieldName = 'Units' Size = 50 end object cdsDrawingQuantityBillsID: TIntegerField FieldName = 'BillsID' end object cdsDrawingQuantityDQuantity1: TFloatField FieldName = 'DQuantity1' end object cdsDrawingQuantityDQuantity2: TFloatField FieldName = 'DQuantity2' end object cdsDrawingQuantityMemoContext: TWideStringField FieldName = 'MemoContext' Size = 200 end object cdsDrawingQuantitySerinalNo: TIntegerField FieldName = 'SerinalNo' end object cdsDrawingQuantityIsGatherQ: TBooleanField FieldName = 'IsGatherQ' end end object dsBillsDrawing: TDataSource DataSet = cdsOrgBills Left = 154 Top = 314 end object cdsOrgBills: TClientDataSet Aggregates = <> Params = <> AfterInsert = cdsOrgBillsAfterInsert BeforeEdit = cdsOrgBillsBeforeEdit BeforePost = cdsOrgBillsBeforePost AfterPost = cdsOrgBillsAfterPost AfterScroll = cdsOrgBillsAfterScroll Left = 42 Top = 312 object cdsOrgBillsChapterID: TIntegerField FieldName = 'ChapterID' end object cdsOrgBillsID: TIntegerField FieldName = 'ID' end object cdsOrgBillsParentID: TIntegerField FieldName = 'ParentID' OnChange = cdsOrgBillsCodeChange end object cdsOrgBillsIsPreDefine: TBooleanField FieldName = 'IsPreDefine' end object cdsOrgBillsNextSiblingID: TIntegerField FieldName = 'NextSiblingID' OnChange = cdsOrgBillsCodeChange end object cdsOrgBillsCode: TWideStringField FieldName = 'Code' OnChange = cdsOrgBillsCodeChange Size = 50 end object cdsOrgBillsName: TWideStringField FieldName = 'Name' OnChange = cdsOrgBillsCodeChange Size = 128 end object cdsOrgBillsUnits: TWideStringField FieldName = 'Units' OnChange = cdsOrgBillsCodeChange Size = 50 end object cdsOrgBillsQuantity: TFloatField FieldName = 'Quantity' OnChange = cdsOrgBillsCodeChange OnGetText = cdsOrgBillsQuantityGetText OnSetText = cdsOrgBillsQuantitySetText end object cdsOrgBillsUnitPrice: TBCDField FieldName = 'UnitPrice' OnChange = cdsOrgBillsCodeChange OnGetText = cdsOrgBillsUnitPriceGetText Precision = 19 end object cdsOrgBillsTotalPrice: TBCDField FieldName = 'TotalPrice' OnChange = cdsOrgBillsCodeChange OnGetText = cdsOrgBillsUnitPriceGetText Precision = 19 end object cdsOrgBillsB_Code: TWideStringField FieldName = 'B_Code' OnChange = cdsOrgBillsCodeChange Size = 255 end object cdsOrgBillsDesignQuantity: TFloatField FieldName = 'DesignQuantity' OnChange = cdsOrgBillsCodeChange OnGetText = cdsOrgBillsQuantityGetText OnSetText = cdsOrgBillsQuantitySetText end object cdsOrgBillsDesignQuantity2: TFloatField FieldName = 'DesignQuantity2' OnChange = cdsOrgBillsCodeChange OnGetText = cdsOrgBillsQuantityGetText OnSetText = cdsOrgBillsQuantitySetText end object cdsOrgBillsDesignPrice: TFloatField FieldName = 'DesignPrice' OnChange = cdsOrgBillsCodeChange OnGetText = cdsOrgBillsUnitPriceGetText end object cdsOrgBillsMemoStr: TMemoField FieldName = 'MemoStr' BlobType = ftMemo end object cdsOrgBillsSelected: TBooleanField FieldName = 'Selected' end object cdsOrgBillsOwnerName: TWideStringField FieldName = 'OwnerName' Size = 50 end object cdsOrgBillsCustomValue: TFloatField FieldName = 'CustomValue' end object cdsOrgBillsSerialNo: TIntegerField FieldName = 'SerialNo' end object cdsOrgBillsLostNextSiblingCount: TIntegerField FieldName = 'LostNextSiblingCount' OnChange = cdsOrgBillsLostNextSiblingCountChange end object cdsOrgBillsLostChildrenCount: TIntegerField FieldName = 'LostChildrenCount' OnChange = cdsOrgBillsLostNextSiblingCountChange end object cdsOrgBillsLostPreSiblingCount: TIntegerField FieldName = 'LostPreSiblingCount' OnChange = cdsOrgBillsLostNextSiblingCountChange end object cdsOrgBillsUserModified: TBooleanField FieldName = 'UserModified' OnChange = cdsOrgBillsLostNextSiblingCountChange end object cdsOrgBillsIsIgNore: TBooleanField FieldName = 'IsIgNore' OnChange = cdsOrgBillsLostNextSiblingCountChange end object cdsOrgBillsDeductGrade: TFloatField FieldName = 'DeductGrade' OnChange = cdsOrgBillsLostNextSiblingCountChange OnGetText = cdsOrgBillsDeductGradeGetText end object cdsOrgBillsStandardGrade: TFloatField FieldName = 'StandardGrade' OnChange = cdsOrgBillsLostNextSiblingCountChange end object cdsOrgBillsIsSuperscale: TBooleanField FieldName = 'IsSuperscale' OnChange = cdsOrgBillsLostNextSiblingCountChange end object cdsOrgBillsErrorHint: TWideStringField FieldName = 'ErrorHint' OnChange = cdsOrgBillsLostNextSiblingCountChange Size = 255 end object cdsOrgBillsNameErrorFlag: TIntegerField FieldName = 'NameErrorFlag' OnChange = cdsOrgBillsLostNextSiblingCountChange end object cdsOrgBillsUnitsErrorFlag: TIntegerField FieldName = 'UnitsErrorFlag' OnChange = cdsOrgBillsLostNextSiblingCountChange end object cdsOrgBillsRightUnits: TWideStringField FieldName = 'RightUnits' Size = 255 end object cdsOrgBillsIsLeaf: TBooleanField FieldName = 'IsLeaf' end object cdsOrgBillsRightName: TWideStringField FieldName = 'RightName' Size = 255 end object cdsOrgBillsIsCreatePriceAnalysis: TBooleanField FieldName = 'IsCreatePriceAnalysis' end object cdsOrgBillsDrawingCode: TWideStringField FieldName = 'DrawingCode' Size = 50 end object cdsOrgBillsIsAccQuantity: TBooleanField FieldName = 'IsAccQuantity' OnChange = cdsOrgBillsIsAccQuantityChange end end object cdsOrgDrawingQuantity: TClientDataSet Aggregates = <> MasterSource = dsBillsDrawing PacketRecords = 0 Params = <> AfterInsert = cdsOrgDrawingQuantityAfterInsert BeforeEdit = cdsOrgDrawingQuantityBeforeEdit BeforePost = cdsOrgDrawingQuantityBeforePost AfterPost = cdsOrgDrawingQuantityAfterPost BeforeDelete = cdsOrgDrawingQuantityBeforeDelete AfterDelete = cdsOrgDrawingQuantityAfterDelete Left = 284 Top = 312 object cdsOrgDrawingQuantityID: TIntegerField FieldName = 'ID' end object cdsOrgDrawingQuantityName: TWideStringField FieldName = 'Name' Size = 200 end object cdsOrgDrawingQuantityUnits: TWideStringField FieldName = 'Units' Size = 50 end object cdsOrgDrawingQuantityBillsID: TIntegerField FieldName = 'BillsID' end object cdsOrgDrawingQuantityDQuantity1: TFloatField FieldName = 'DQuantity1' OnChange = cdsOrgBillsCodeChange OnGetText = cdsOrgDrawingQuantityDQuantity1GetText OnSetText = cdsOrgDrawingQuantityDQuantity1SetText end object cdsOrgDrawingQuantityMemoContext: TWideStringField FieldName = 'MemoContext' Size = 200 end object cdsOrgDrawingQuantitySerinalNo: TIntegerField FieldName = 'SerinalNo' end object cdsOrgDrawingQuantityIsGatherQ: TBooleanField FieldName = 'IsGatherQ' OnChange = cdsOrgBillsCodeChange end end object cdsDQForLocate: TClientDataSet Aggregates = <> Params = <> Left = 282 Top = 190 object cdsDQForLocateID: TIntegerField FieldName = 'ID' end object cdsDQForLocateBillsID: TIntegerField FieldName = 'BillsID' end object cdsDQForLocateName: TWideStringField FieldName = 'Name' Size = 200 end object cdsDQForLocateUnits: TWideStringField FieldName = 'Units' Size = 50 end object cdsDQForLocateMemoContext: TWideStringField FieldName = 'MemoContext' Size = 200 end object cdsDQForLocateDQuantity1: TFloatField FieldName = 'DQuantity1' end object cdsDQForLocateDQuantity2: TFloatField FieldName = 'DQuantity2' end object cdsDQForLocateSerinalNo: TIntegerField FieldName = 'SerinalNo' end object cdsDQForLocateIsGatherQ: TBooleanField FieldName = 'IsGatherQ' end end object cdsXMJBills: TClientDataSet Aggregates = <> Params = <> AfterScroll = cdsXMJBillsAfterScroll Left = 40 Top = 386 object cdsXMJBillsQuantity: TFloatField FieldName = 'Quantity' OnGetText = cdsXMJBillsQuantityGetText end object cdsXMJBillsUnitPrice: TBCDField FieldName = 'UnitPrice' OnGetText = cdsXMJBillsQuantityGetText Precision = 19 end object cdsXMJBillsID: TIntegerField FieldName = 'ID' end object cdsXMJBillsParentID: TIntegerField FieldName = 'ParentID' end object cdsXMJBillsNextSiblingID: TIntegerField FieldName = 'NextSiblingID' end object cdsXMJBillsCode: TWideStringField FieldName = 'Code' Size = 50 end object cdsXMJBillsName: TWideStringField FieldName = 'Name' Size = 128 end object cdsXMJBillsUnits: TWideStringField FieldName = 'Units' Size = 50 end object cdsXMJBillsB_Code: TWideStringField FieldName = 'B_Code' Size = 255 end object cdsXMJBillsMemoStr: TMemoField FieldName = 'MemoStr' BlobType = ftMemo end object cdsXMJBillsTotalPrice: TBCDField FieldName = 'TotalPrice' OnGetText = cdsXMJBillsQuantityGetText Precision = 19 end object cdsXMJBillsDesignQuantity: TFloatField FieldName = 'DesignQuantity' OnGetText = cdsXMJBillsQuantityGetText end object cdsXMJBillsDesignQuantity2: TFloatField FieldName = 'DesignQuantity2' OnGetText = cdsXMJBillsQuantityGetText end object cdsXMJBillsDesignPrice: TFloatField FieldName = 'DesignPrice' OnGetText = cdsXMJBillsQuantityGetText end object cdsXMJBillsSelected: TBooleanField FieldName = 'Selected' end object cdsXMJBillsChapterID: TIntegerField FieldName = 'ChapterID' end object cdsXMJBillsIsPreDefine: TBooleanField FieldName = 'IsPreDefine' end object cdsXMJBillsUnitsErrorFlag: TIntegerField FieldName = 'UnitsErrorFlag' OnChange = cdsOrgBillsLostNextSiblingCountChange end object cdsXMJBillsNameErrorFlag: TIntegerField FieldName = 'NameErrorFlag' OnChange = cdsOrgBillsLostNextSiblingCountChange end object cdsXMJBillsErrorHint: TWideStringField FieldName = 'ErrorHint' OnChange = cdsOrgBillsLostNextSiblingCountChange Size = 255 end object cdsXMJBillsIsSuperscale: TBooleanField FieldName = 'IsSuperscale' OnChange = cdsOrgBillsLostNextSiblingCountChange end object cdsXMJBillsStandardGrade: TFloatField FieldName = 'StandardGrade' OnChange = cdsOrgBillsLostNextSiblingCountChange end object cdsXMJBillsDeductGrade: TFloatField FieldName = 'DeductGrade' OnChange = cdsOrgBillsLostNextSiblingCountChange OnGetText = cdsOrgBillsDeductGradeGetText end object cdsXMJBillsIsIgNore: TBooleanField FieldName = 'IsIgNore' OnChange = cdsOrgBillsLostNextSiblingCountChange end object cdsXMJBillsUserModified: TBooleanField FieldName = 'UserModified' OnChange = cdsOrgBillsLostNextSiblingCountChange end object cdsXMJBillsLostPreSiblingCount: TIntegerField FieldName = 'LostPreSiblingCount' OnChange = cdsOrgBillsLostNextSiblingCountChange end object cdsXMJBillsLostChildrenCount: TIntegerField FieldName = 'LostChildrenCount' OnChange = cdsOrgBillsLostNextSiblingCountChange end object cdsXMJBillsLostNextSiblingCount: TIntegerField FieldName = 'LostNextSiblingCount' OnChange = cdsOrgBillsLostNextSiblingCountChange end object cdsXMJBillsRightName: TWideStringField FieldName = 'RightName' Size = 255 end object cdsXMJBillsRightUnits: TWideStringField FieldName = 'RightUnits' Size = 255 end object blnfldXMJBillsIsAccQuantity: TBooleanField FieldName = 'IsAccQuantity' end end object cdsBillsLookup: TClientDataSet Aggregates = <> Params = <> ProviderName = 'dspBills' Left = 33 Top = 256 object cdsBillsLookupID: TIntegerField FieldName = 'ID' end object cdsBillsLookupParentID: TIntegerField FieldName = 'ParentID' end object cdsBillsLookupNextSiblingID: TIntegerField FieldName = 'NextSiblingID' end object cdsBillsLookupCode: TWideStringField FieldName = 'Code' Size = 50 end object cdsBillsLookupName: TWideStringField FieldName = 'Name' Size = 128 end object cdsBillsLookupUnits: TWideStringField FieldName = 'Units' Size = 50 end object cdsBillsLookupQuantity: TFloatField FieldName = 'Quantity' end object cdsBillsLookupUnitPrice: TBCDField FieldName = 'UnitPrice' Precision = 19 end object cdsBillsLookupTotalPrice: TBCDField FieldName = 'TotalPrice' Precision = 19 end object cdsBillsLookupB_Code: TWideStringField FieldName = 'B_Code' Size = 255 end object cdsBillsLookupDesignQuantity: TFloatField FieldName = 'DesignQuantity' end object cdsBillsLookupDesignQuantity2: TFloatField FieldName = 'DesignQuantity2' end object cdsBillsLookupDesignPrice: TFloatField FieldName = 'DesignPrice' end object cdsBillsLookupMemoStr: TMemoField FieldName = 'MemoStr' BlobType = ftMemo end object cdsBillsLookupIsPreDefine: TBooleanField FieldName = 'IsPreDefine' end object cdsBillsLookupSelected: TBooleanField FieldName = 'Selected' end object cdsBillsLookupCustomValue: TFloatField FieldName = 'CustomValue' end object cdsBillsLookupSerialNo: TIntegerField FieldName = 'SerialNo' end object cdsBillsLookupLostNextSiblingCount: TIntegerField FieldName = 'LostNextSiblingCount' end object cdsBillsLookupLostChildrenCount: TIntegerField FieldName = 'LostChildrenCount' end object cdsBillsLookupLostPreSiblingCount: TIntegerField FieldName = 'LostPreSiblingCount' end object cdsBillsLookupUserModified: TBooleanField FieldName = 'UserModified' end object cdsBillsLookupIsIgNore: TBooleanField FieldName = 'IsIgNore' end object cdsBillsLookupDeductGrade: TFloatField FieldName = 'DeductGrade' end object cdsBillsLookupStandardGrade: TFloatField FieldName = 'StandardGrade' end object cdsBillsLookupIsSuperscale: TBooleanField FieldName = 'IsSuperscale' end object cdsBillsLookupErrorHint: TWideStringField FieldName = 'ErrorHint' Size = 255 end object cdsBillsLookupNameErrorFlag: TIntegerField FieldName = 'NameErrorFlag' end object cdsBillsLookupUnitsErrorFlag: TIntegerField FieldName = 'UnitsErrorFlag' end object cdsBillsLookupDrawingCode: TWideStringField FieldName = 'DrawingCode' Size = 50 end object cdsBillsLookupIsAccQuantity: TBooleanField FieldName = 'IsAccQuantity' end end object aqStat: TADOQuery OnCalcFields = aqStatCalcFields Parameters = <> SQL.Strings = ( 'Select T3.*, T4.YsCount, T4.QdCount from' '(Select T1.*, T2.StandardGrade, T2.DeductGrade from' '(Select ChapterID, Code, Name from Bills where (Len(Code) <= 4) ' + 'and (Left(Code, 2) = '#39'1-'#39')) as T1,' '(Select ChapterID, Sum(StandardGrade) as StandardGrade, Sum(Dedu' + 'ctGrade) as DeductGrade from Bills ' 'where' 'IsIgnore <> True Group by ChapterID) as T2' 'where T1.ChapterID = T2.ChapterID) as T3' 'left join' '(Select ChapterID, Count(Code) as YsCount, Count(B_Code) as QdCo' + 'unt from Bills where IsIgnore <> True and' 'IsSuperscale = True Group by ChapterID) as T4' 'on T3.ChapterID = T4.ChapterID' 'order by T3.ChapterID') Left = 408 Top = 520 object aqStatChapterID: TIntegerField FieldName = 'ChapterID' end object aqStatCode: TWideStringField FieldName = 'Code' Size = 50 end object aqStatName: TWideStringField FieldName = 'Name' Size = 128 end object aqStatStandardGrade: TFloatField FieldName = 'StandardGrade' end object aqStatDeductGrade: TFloatField FieldName = 'DeductGrade' end object aqStatActureMark: TCurrencyField FieldKind = fkCalculated FieldName = 'ActureMark' currency = False Calculated = True end object aqStatTotalMark: TCurrencyField FieldKind = fkCalculated FieldName = 'TotalMark' currency = False Calculated = True end object aqStatResultMark: TCurrencyField FieldKind = fkCalculated FieldName = 'ResultMark' currency = False Calculated = True end object aqStatStdMarkPercent: TBCDField FieldKind = fkCalculated FieldName = 'StdMarkPercent' Calculated = True end object aqStatYsCount: TIntegerField FieldName = 'YsCount' end object aqStatQdCount: TIntegerField FieldName = 'QdCount' end end object cdsStat: TClientDataSet Aggregates = <> IndexFieldNames = 'Code' Params = <> ProviderName = 'dspStat' Left = 220 Top = 520 object cdsStatChapterID: TIntegerField FieldName = 'ChapterID' end object cdsStatCode: TWideStringField FieldName = 'Code' Size = 50 end object cdsStatName: TWideStringField FieldName = 'Name' Size = 128 end object cdsStatStandardGrade: TBCDField FieldName = 'StandardGrade' end object cdsStatDeductGrade: TBCDField FieldName = 'DeductGrade' end object cdsStatActureMark: TBCDField FieldName = 'ActureMark' end object cdsStatTotalMark: TBCDField FieldName = 'TotalMark' end object cdsStatResultMark: TBCDField FieldName = 'ResultMark' end object cdsStatStdMarkPercent: TBCDField FieldName = 'StdMarkPercent' end object cdsStatYsCount: TIntegerField FieldName = 'YsCount' end object cdsStatQdCount: TIntegerField FieldName = 'QdCount' end end object dsStat: TDataSource DataSet = cdsStat Left = 314 Top = 520 end object atStat: TADOTable TableName = 'GradeStat' Left = 32 Top = 520 end object dspStat: TDataSetProvider DataSet = atStat UpdateMode = upWhereKeyOnly Left = 126 Top = 520 end object acProject: TADOConnection Left = 288 Top = 56 end object cdsStatTotal: TClientDataSet Aggregates = <> Params = <> ProviderName = 'dspStatTotal' Left = 220 Top = 464 object cdsStatTotalID: TIntegerField FieldName = 'ID' end object cdsStatTotalStandardGradeTotal: TBCDField FieldName = 'StandardGradeTotal' end object cdsStatTotalDeductGradeTotal: TBCDField FieldName = 'DeductGradeTotal' end object cdsStatTotalResultMarkTotal: TBCDField FieldName = 'ResultMarkTotal' end object cdsStatTotalAdditionalMark: TBCDField FieldName = 'AdditionalMark' end object cdsStatTotalQualityMark: TBCDField FieldName = 'QualityMark' end object cdsStatTotalYsCountTotal: TIntegerField FieldName = 'YsCountTotal' end object cdsStatTotalQdCountTotal: TIntegerField FieldName = 'QdCountTotal' end end object atStatTotal: TADOTable TableName = 'GradeStatTotal' Left = 32 Top = 464 end object dspStatTotal: TDataSetProvider DataSet = atStatTotal UpdateMode = upWhereKeyOnly Left = 126 Top = 464 end object aqStatTotal: TADOQuery OnCalcFields = aqStatTotalCalcFields Parameters = <> SQL.Strings = ( 'Select T1.*, T2.* from' '(Select 1 as ID, Sum(StandardGrade) as StandardGradeTotal, Sum(D' + 'eductGrade) as DeductGradeTotal from Bills where IsIgnore <> Tru' + 'e) as T1,' '(Select Count(Code) as YsCountTotal, Count(B_Code) as QdCountTot' + 'al from Bills' 'where IsIgnore <> True and IsSuperscale = True) as T2') Left = 312 Top = 464 object aqStatTotalID: TIntegerField FieldName = 'ID' end object aqStatTotalStandardGradeTotal: TBCDField FieldName = 'StandardGradeTotal' end object aqStatTotalDeductGradeTotal: TBCDField FieldName = 'DeductGradeTotal' end object aqStatTotalYsCountTotal: TIntegerField FieldName = 'YsCountTotal' end object aqStatTotalQdCountTotal: TIntegerField FieldName = 'QdCountTotal' end object aqStatTotalResultMarkTotal: TBCDField FieldKind = fkCalculated FieldName = 'ResultMarkTotal' Calculated = True end object aqStatTotalAdditionalMark: TBCDField FieldKind = fkCalculated FieldName = 'AdditionalMark' Calculated = True end object aqStatTotalQualityMark: TBCDField FieldKind = fkCalculated FieldName = 'QualityMark' Calculated = True end end end