internal void DoneReadingRows(ref Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[] runningValueValues, ref Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[] runningValueOfAggregateValues, ref Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[] cellRunningValueValues) { AggregatesImpl aggregatesImpl = m_odpContext.ReportObjectModel.AggregatesImpl; RuntimeRICollection.StoreRunningValues(aggregatesImpl, m_hierarchyDef.RunningValues, ref runningValueValues); if (m_hierarchyDef.DataScopeInfo != null) { RuntimeRICollection.StoreRunningValues(aggregatesImpl, m_hierarchyDef.DataScopeInfo.RunningValuesOfAggregates, ref runningValueOfAggregateValues); } int num = (m_staticCellPreviousValues != null) ? m_staticCellPreviousValues.Count : 0; int num2 = (m_staticCellRVs != null) ? m_staticCellRVs.Count : 0; if (num2 > 0) { cellRunningValueValues = new Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[num2 + num]; for (int i = 0; i < num2; i++) { Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj = aggregatesImpl.GetAggregateObj(m_staticCellRVs[i]); cellRunningValueValues[i] = aggregateObj.AggregateResult(); } } if (num > 0) { if (cellRunningValueValues == null) { cellRunningValueValues = new Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[num]; } for (int j = 0; j < num; j++) { Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj2 = aggregatesImpl.GetAggregateObj(m_staticCellPreviousValues[j]); cellRunningValueValues[num2 + j] = aggregateObj2.AggregateResult(); } } }
internal void Init() { if (!m_nonAggregateMode) { m_aggregator.Init(); m_aggregateResult = new DataAggregateObjResult(); } }
internal DataAggregateObjResult(DataAggregateObjResult original) { ErrorOccurred = original.ErrorOccurred; HasCode = original.HasCode; Code = original.Code; Severity = original.Severity; FieldStatus = original.FieldStatus; CloneHelperStruct cloneHelperStruct = new CloneHelperStruct(original.Value); Value = cloneHelperStruct.Value; Arguments = original.Arguments; }
internal void ResetForNoRows() { if (m_nonAggregateMode) { m_aggregateResult = new DataAggregateObjResult(); m_aggregateResult.Value = AggregatorFactory.Instance.GetNoRowsResult(m_aggregateDef); } else { Init(); } }
public void Deserialize(IntermediateFormatReader reader) { reader.RegisterDeclaration(m_declaration); IScalabilityCache scalabilityCache = reader.PersistenceHelper as IScalabilityCache; while (reader.NextMember()) { switch (reader.CurrentMember.MemberName) { case MemberName.NonAggregateMode: m_nonAggregateMode = reader.ReadBoolean(); break; case MemberName.Aggregator: m_aggregator = (DataAggregate)reader.ReadRIFObject(); break; case MemberName.AggregateDef: { int id2 = reader.ReadInt32(); m_aggregateDef = (DataAggregateInfo)scalabilityCache.FetchStaticReference(id2); break; } case MemberName.ReportRuntime: { int id = reader.ReadInt32(); m_reportRT = (Microsoft.ReportingServices.RdlExpressions.ReportRuntime)scalabilityCache.FetchStaticReference(id); break; } case MemberName.UsedInExpression: m_usedInExpression = reader.ReadBoolean(); break; case MemberName.AggregateResult: m_aggregateResult = (DataAggregateObjResult)reader.ReadRIFObject(); break; default: Global.Tracer.Assert(condition: false); break; } } }
internal static void StoreRunningValues(AggregatesImpl globalRVCol, List <Microsoft.ReportingServices.ReportIntermediateFormat.RunningValueInfo> runningValues, ref Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[] runningValueValues) { if (runningValues != null && 0 < runningValues.Count) { if (runningValueValues == null) { runningValueValues = new Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[runningValues.Count]; } for (int i = 0; i < runningValues.Count; i++) { Microsoft.ReportingServices.ReportIntermediateFormat.RunningValueInfo runningValueInfo = runningValues[i]; Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj = globalRVCol.GetAggregateObj(runningValueInfo.Name); if (aggregateObj != null) { runningValueValues[i] = aggregateObj.AggregateResult(); } } } else { runningValueValues = null; } }
private object GetAggregateValue(string key, Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj) { aggregateObj.UsedInExpression = true; Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult dataAggregateObjResult = aggregateObj.AggregateResult(); if (dataAggregateObjResult == null) { Global.Tracer.Assert(m_odpContext.IsTablixProcessingMode, "Missing aggregate result outside of tablix processing"); throw new ReportProcessingException_MissingAggregateDependency(); } if (dataAggregateObjResult.HasCode) { if ((dataAggregateObjResult.FieldStatus == DataFieldStatus.None || dataAggregateObjResult.FieldStatus == DataFieldStatus.IsError) && dataAggregateObjResult.Code != 0) { ErrorContext.Register(dataAggregateObjResult.Code, dataAggregateObjResult.Severity, dataAggregateObjResult.Arguments); } else if (dataAggregateObjResult.FieldStatus == DataFieldStatus.UnSupportedDataType) { ErrorContext.Register(ProcessingErrorCode.rsAggregateOfInvalidExpressionDataType, Severity.Warning, dataAggregateObjResult.Arguments); } if (dataAggregateObjResult.ErrorOccurred) { throw new ReportProcessingException_InvalidOperationException(); } } if (dataAggregateObjResult.ErrorOccurred) { throw new ReportProcessingException(ErrorCode.rsInvalidOperation); } return(dataAggregateObjResult.Value); }
internal void Set(string name, Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateInfo aggregateDef, List <string> duplicateNames, Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult aggregateResult) { Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj = GetAggregateObj(name); if (aggregateObj == null) { try { if (m_lockAdd) { Monitor.Enter(m_collection); } aggregateObj = new Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj(aggregateDef, aggregateResult); m_collection.Add(name, aggregateObj); PopulateDuplicateNames(name, duplicateNames); } finally { if (m_lockAdd) { Monitor.Exit(m_collection); } } } else { aggregateObj.Set(aggregateResult); } }
private static void SetupAggregate <AggregateType>(OnDemandProcessingContext odpContext, AggregateType aggregateDef, DataAggregateObjResult aggregateObj) where AggregateType : DataAggregateInfo { odpContext.ReportObjectModel.AggregatesImpl.Set(aggregateDef.Name, aggregateDef, aggregateDef.DuplicateNames, aggregateObj); }
private static void StoreAggregate <AggregateType>(OnDemandProcessingContext odpContext, AggregateType aggregateDef, ref List <DataAggregateObjResult> aggregateValues) where AggregateType : DataAggregateInfo { DataAggregateObjResult item = odpContext.ReportObjectModel.AggregatesImpl.GetAggregateObj(aggregateDef.Name).AggregateResult(); aggregateValues.Add(item); }
internal DataAggregateObj(DataAggregateInfo aggrDef, DataAggregateObjResult aggrResult) { m_nonAggregateMode = true; m_aggregateDef = aggrDef; m_aggregateResult = aggrResult; }
internal void Set(DataAggregateObjResult aggregateResult) { m_nonAggregateMode = true; m_aggregateResult = aggregateResult; }