public override void Update(object[] expressions, IErrorContext iErrorContext) { object obj = expressions[0]; AspNetCore.ReportingServices.ReportProcessing.DataAggregate.DataTypeCode typeCode = DataAggregate.GetTypeCode(obj); if (!DataAggregate.IsNull(typeCode)) { if (!DataTypeUtility.IsNumeric(typeCode)) { iErrorContext.Register(ProcessingErrorCode.rsAggregateOfNonNumericData, Severity.Warning); throw new ReportProcessingException(ErrorCode.rsInvalidOperation); } DataAggregate.ConvertToDoubleOrDecimal(typeCode, obj, out typeCode, out obj); if (this.m_expressionType == AspNetCore.ReportingServices.ReportProcessing.DataAggregate.DataTypeCode.Null) { this.m_expressionType = typeCode; } else if (typeCode != this.m_expressionType) { iErrorContext.Register(ProcessingErrorCode.rsAggregateOfMixedDataTypes, Severity.Warning); throw new ReportProcessingException(ErrorCode.rsInvalidOperation); } if (this.m_currentTotal == null) { this.m_currentTotalType = typeCode; this.m_currentTotal = obj; } else { this.m_currentTotal = DataAggregate.Add(this.m_currentTotalType, this.m_currentTotal, typeCode, obj); } } }
internal override void Update(object[] expressions, IErrorContext iErrorContext) { object doubleOrDecimalData = expressions[0]; Microsoft.ReportingServices.ReportProcessing.DataAggregate.DataTypeCode doubleOrDecimalType = DataAggregate.GetTypeCode(doubleOrDecimalData); if (!DataAggregate.IsNull(doubleOrDecimalType)) { if (!DataTypeUtility.IsNumeric(doubleOrDecimalType)) { iErrorContext.Register(ProcessingErrorCode.rsAggregateOfNonNumericData, Severity.Warning); throw new ReportProcessingException(ErrorCode.rsInvalidOperation); } DataAggregate.ConvertToDoubleOrDecimal(doubleOrDecimalType, doubleOrDecimalData, out doubleOrDecimalType, out doubleOrDecimalData); if (m_expressionType == Microsoft.ReportingServices.ReportProcessing.DataAggregate.DataTypeCode.Null) { m_expressionType = doubleOrDecimalType; } else if (doubleOrDecimalType != m_expressionType) { iErrorContext.Register(ProcessingErrorCode.rsAggregateOfMixedDataTypes, Severity.Warning); throw new ReportProcessingException(ErrorCode.rsInvalidOperation); } if (m_currentTotal == null) { m_currentTotalType = doubleOrDecimalType; m_currentTotal = doubleOrDecimalData; } else { m_currentTotal = DataAggregate.Add(m_currentTotalType, m_currentTotal, doubleOrDecimalType, doubleOrDecimalData); } } }