public void UpdateAggregatesForRow()
 {
     Global.Tracer.Assert(m_aggsForUpdateAtRowScope != null || m_runningValuesForUpdateAtRow != null, "UpdateAggregatesForRow must be driven by a call to UpdateAggregates.");
     if (m_aggsForUpdateAtRowScope != null)
     {
         foreach (Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj item in m_aggsForUpdateAtRowScope)
         {
             item.Update();
         }
     }
     if (m_runningValuesForUpdateAtRow != null)
     {
         RuntimeDataTablixObj.UpdateRunningValues(m_odpContext, m_runningValuesForUpdateAtRow);
     }
 }
 public bool UpdateAggregates(DataScopeInfo scopeInfo, IDataRowHolder scopeInst, AggregateUpdateFlags updateFlags, bool needsSetupEnvironment)
 {
     m_aggsForUpdateAtRowScope     = null;
     m_runningValuesForUpdateAtRow = null;
     if (m_activeAggregates == null)
     {
         return(false);
     }
     for (AggregateUpdateCollection aggregateUpdateCollection = m_activeAggregates; aggregateUpdateCollection != null; aggregateUpdateCollection = aggregateUpdateCollection.LinkedCollection)
     {
         if (aggregateUpdateCollection.GetAggregatesForScope(scopeInfo.ScopeID, out List <Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj> aggs))
         {
             if (needsSetupEnvironment)
             {
                 scopeInst.SetupEnvironment();
                 needsSetupEnvironment = false;
             }
             foreach (Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj item in aggs)
             {
                 item.Update();
             }
         }
         if (aggregateUpdateCollection.GetAggregatesForRowScope(scopeInfo.ScopeID, out aggs))
         {
             if (m_aggsForUpdateAtRowScope == null)
             {
                 m_aggsForUpdateAtRowScope = new List <Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj>();
             }
             m_aggsForUpdateAtRowScope.AddRange(aggs);
         }
         if (aggregateUpdateCollection.GetRunningValuesForScope(scopeInfo.ScopeID, out List <string> aggs2))
         {
             if (needsSetupEnvironment)
             {
                 scopeInst.SetupEnvironment();
                 needsSetupEnvironment = false;
             }
             RuntimeDataTablixObj.UpdateRunningValues(m_odpContext, aggs2);
         }
         if (aggregateUpdateCollection.GetRunningValuesForRowScope(scopeInfo.ScopeID, out aggs2))
         {
             if (m_runningValuesForUpdateAtRow == null)
             {
                 m_runningValuesForUpdateAtRow = new List <string>();
             }
             m_runningValuesForUpdateAtRow.AddRange(aggs2);
         }
     }
     if (m_aggsForUpdateAtRowScope != null || m_runningValuesForUpdateAtRow != null)
     {
         if (needsSetupEnvironment)
         {
             scopeInst.SetupEnvironment();
         }
         if (FlagUtils.HasFlag(updateFlags, AggregateUpdateFlags.RowAggregates))
         {
             scopeInst.ReadRows(DataActions.AggregatesOfAggregates, this);
         }
     }
     return(scopeInfo.ScopeID != m_activeAggregates.InnermostUpdateScopeID);
 }