private void CalculateDRPreviousAggregates()
 {
     SetupEnvironment();
     if (m_previousValues != null)
     {
         AggregatesImpl aggregatesImpl = m_odpContext.ReportObjectModel.AggregatesImpl;
         for (int i = 0; i < m_previousValues.Count; i++)
         {
             string text = m_previousValues[i];
             Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj = aggregatesImpl.GetAggregateObj(text);
             Global.Tracer.Assert(aggregateObj != null, "Missing expected previous aggregate: {0}", text);
             aggregateObj.Update();
         }
     }
 }
 internal static void UpdateAggregates(OnDemandProcessingContext odpContext, List <Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj> aggregates, bool updateAndSetup)
 {
     if (aggregates == null)
     {
         return;
     }
     for (int i = 0; i < aggregates.Count; i++)
     {
         Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj dataAggregateObj = aggregates[i];
         dataAggregateObj.Update();
         if (updateAndSetup)
         {
             odpContext.ReportObjectModel.AggregatesImpl.Set(dataAggregateObj.Name, dataAggregateObj.AggregateDef, dataAggregateObj.DuplicateNames, dataAggregateObj.AggregateResult());
         }
     }
 }
Example #3
0
        public override void ReadRow(DataActions dataAction, ITraversalContext context)
        {
            if (!FlagUtils.HasFlag(dataAction, DataActions.PostSortAggregates) || !FlagUtils.HasFlag(m_dataAction, DataActions.PostSortAggregates))
            {
                return;
            }
            AggregatesImpl aggregatesImpl = m_odpContext.ReportObjectModel.AggregatesImpl;

            if (m_hierarchyDef.DataRegionDef.ProcessCellRunningValues)
            {
                if (m_cellRVs != null)
                {
                    for (int i = 0; i < m_cellRVs.Count; i++)
                    {
                        string text = m_cellRVs[i];
                        Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj = aggregatesImpl.GetAggregateObj(text);
                        Global.Tracer.Assert(aggregateObj != null, "Missing expected running value: {0}", text);
                        aggregateObj.Update();
                    }
                }
                if (m_outerScope != null && m_hierarchyDef.DataRegionDef.CellPostSortAggregates != null)
                {
                    using (m_outerScope.PinValue())
                    {
                        m_outerScope.Value().ReadRow(dataAction, context);
                    }
                }
                return;
            }
            if (m_staticCellRVs != null)
            {
                for (int j = 0; j < m_staticCellRVs.Count; j++)
                {
                    string text2 = m_staticCellRVs[j];
                    Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj2 = aggregatesImpl.GetAggregateObj(text2);
                    Global.Tracer.Assert(aggregateObj2 != null, "Missing expected running value: {0}", text2);
                    aggregateObj2.Update();
                }
            }
            base.ReadRow(dataAction, context);
        }
Example #4
0
        internal override void CalculatePreviousAggregates()
        {
            if (!FlagUtils.HasFlag(m_dataAction, DataActions.PostSortAggregates))
            {
                return;
            }
            AggregatesImpl aggregatesImpl = m_odpContext.ReportObjectModel.AggregatesImpl;

            if (m_hierarchyDef.DataRegionDef.ProcessCellRunningValues)
            {
                if (m_cellPreviousValues != null)
                {
                    for (int i = 0; i < m_cellPreviousValues.Count; i++)
                    {
                        string text = m_cellPreviousValues[i];
                        Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj = aggregatesImpl.GetAggregateObj(text);
                        Global.Tracer.Assert(aggregateObj != null, "Missing expected previous aggregate: {0}", text);
                        aggregateObj.Update();
                    }
                }
                if (m_outerScope != null && (m_outerDataAction & DataActions.PostSortAggregates) != 0)
                {
                    using (m_outerScope.PinValue())
                    {
                        m_outerScope.Value().CalculatePreviousAggregates();
                    }
                }
                return;
            }
            if (m_staticCellPreviousValues != null)
            {
                for (int j = 0; j < m_staticCellPreviousValues.Count; j++)
                {
                    string text2 = m_staticCellPreviousValues[j];
                    Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj2 = aggregatesImpl.GetAggregateObj(text2);
                    Global.Tracer.Assert(aggregateObj2 != null, "Missing expected previous aggregate: {0}", text2);
                    aggregateObj2.Update();
                }
            }
            base.CalculatePreviousAggregates();
        }
Example #5
0
 public override void ReadRow(DataActions dataAction, ITraversalContext context)
 {
     if (DataActions.PostSortAggregates == dataAction && m_runningValuesInGroup != null)
     {
         AggregatesImpl aggregatesImpl = m_odpContext.ReportObjectModel.AggregatesImpl;
         for (int i = 0; i < m_runningValuesInGroup.Count; i++)
         {
             string text = m_runningValuesInGroup[i];
             Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj = aggregatesImpl.GetAggregateObj(text);
             Global.Tracer.Assert(aggregateObj != null, "Missing expected running value aggregate: {0}", text);
             aggregateObj.Update();
         }
     }
     if (m_outerScope != null && (dataAction & m_outerDataAction) != 0)
     {
         using (m_outerScope.PinValue())
         {
             m_outerScope.Value().ReadRow(dataAction, context);
         }
     }
 }
Example #6
0
 internal override void CalculatePreviousAggregates()
 {
     if (m_previousValuesInGroup != null)
     {
         AggregatesImpl aggregatesImpl = m_odpContext.ReportObjectModel.AggregatesImpl;
         for (int i = 0; i < m_previousValuesInGroup.Count; i++)
         {
             string text = m_previousValuesInGroup[i];
             Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj = aggregatesImpl.GetAggregateObj(text);
             Global.Tracer.Assert(aggregateObj != null, "Missing expected previous aggregate: {0}", text);
             aggregateObj.Update();
         }
     }
     if (m_outerScope != null && (m_outerDataAction & DataActions.PostSortAggregates) != 0)
     {
         using (m_outerScope.PinValue())
         {
             m_outerScope.Value().CalculatePreviousAggregates();
         }
     }
 }