private void AddRunningValue(Microsoft.ReportingServices.ReportIntermediateFormat.RunningValueInfo runningValue, List <string> runningValuesInGroup, List <string> previousValuesInGroup, Dictionary <string, IReference <RuntimeGroupRootObj> > groupCollection) { AggregatesImpl aggregatesImpl = m_odpContext.ReportObjectModel.AggregatesImpl; bool flag = runningValue.AggregateType == Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateInfo.AggregateTypes.Previous; List <string> list = (!flag) ? runningValuesInGroup : previousValuesInGroup; Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj dataAggregateObj = aggregatesImpl.GetAggregateObj(runningValue.Name); if (dataAggregateObj == null) { dataAggregateObj = new Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj(runningValue, m_odpContext); aggregatesImpl.Add(dataAggregateObj); } else if (flag && (runningValue.Scope == null || runningValue.IsScopedInEvaluationScope)) { dataAggregateObj.Init(); } if (runningValue.Scope != null) { if (groupCollection.TryGetValue(runningValue.Scope, out IReference <RuntimeGroupRootObj> value)) { using (value.PinValue()) { value.Value().AddScopedRunningValue(dataAggregateObj); } } else { Global.Tracer.Assert(condition: false, "RV with runtime scope escalation"); } } if (!list.Contains(dataAggregateObj.Name)) { list.Add(dataAggregateObj.Name); } }
internal static void AddRunningValues(OnDemandProcessingContext odpContext, List <Microsoft.ReportingServices.ReportIntermediateFormat.RunningValueInfo> runningValues, ref List <string> runningValuesInGroup, ref List <string> previousValuesInGroup, Dictionary <string, IReference <RuntimeGroupRootObj> > groupCollection, IReference <RuntimeGroupRootObj> lastGroup) { if (runningValues == null || 0 >= runningValues.Count) { return; } if (runningValuesInGroup == null) { runningValuesInGroup = new List <string>(); } if (previousValuesInGroup == null) { previousValuesInGroup = new List <string>(); } AggregatesImpl aggregatesImpl = odpContext.ReportObjectModel.AggregatesImpl; for (int i = 0; i < runningValues.Count; i++) { Microsoft.ReportingServices.ReportIntermediateFormat.RunningValueInfo runningValueInfo = runningValues[i]; Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj dataAggregateObj = aggregatesImpl.GetAggregateObj(runningValueInfo.Name); if (dataAggregateObj == null) { dataAggregateObj = new Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj(runningValueInfo, odpContext); aggregatesImpl.Add(dataAggregateObj); } if (runningValueInfo.Scope != null) { if (groupCollection.TryGetValue(runningValueInfo.Scope, out IReference <RuntimeGroupRootObj> value)) { using (value.PinValue()) { value.Value().AddScopedRunningValue(dataAggregateObj); } } else { Global.Tracer.Assert(condition: false); } } if (runningValueInfo.AggregateType == Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateInfo.AggregateTypes.Previous) { previousValuesInGroup.Add(dataAggregateObj.Name); } else { runningValuesInGroup.Add(dataAggregateObj.Name); } } }
public override object PublishClone(AutomaticSubtotalContext context) { RunningValueInfo obj = (RunningValueInfo)base.PublishClone(context); obj.m_scope = context.GetNewScopeName(m_scope); return obj; }
private static void SetupRunningValues(OnDemandProcessingContext odpContext, ref int startIndex, List <Microsoft.ReportingServices.ReportIntermediateFormat.RunningValueInfo> rvDefs, Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[] rvValues) { if (rvDefs != null && rvValues != null) { AggregatesImpl aggregatesImpl = odpContext.ReportObjectModel.AggregatesImpl; for (int i = 0; i < rvDefs.Count; i++) { Microsoft.ReportingServices.ReportIntermediateFormat.RunningValueInfo runningValueInfo = rvDefs[i]; aggregatesImpl.Set(runningValueInfo.Name, runningValueInfo, runningValueInfo.DuplicateNames, rvValues[startIndex + i]); } startIndex += rvDefs.Count; } }
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; } }
internal override DataAggregate ConstructAggregator(OnDemandProcessingContext odpContext, DataAggregateInfo aggregateDef) { RunningValueInfo runningValueInfo = (RunningValueInfo)aggregateDef; return(new Previous(odpContext, runningValueInfo.TotalGroupingExpressionCount, runningValueInfo.IsScopedInEvaluationScope, string.IsNullOrEmpty(runningValueInfo.Scope))); }