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