public void SortAndFilter(AggregateUpdateContext aggContext)
 {
     if (this.m_runtimeDataRegions != null)
     {
         this.m_runtimeDataRegions.SortAndFilter(aggContext);
     }
 }
        private void Traverse(ProcessingStages operation, AggregateUpdateContext context)
        {
            if (this.Count != 0)
            {
                int num = this.m_firstCellKey;
                int num2;
                do
                {
                    num2 = num;
                    IDisposable disposable = default(IDisposable);
                    RuntimeCell andPinCell = this.GetAndPinCell(num2, out disposable);
                    switch (operation)
                    {
                    case ProcessingStages.SortAndFilter:
                        andPinCell.SortAndFilter(context);
                        break;

                    case ProcessingStages.UpdateAggregates:
                        andPinCell.UpdateAggregates(context);
                        break;

                    default:
                        Global.Tracer.Assert(false, "Unknown operation in Traverse");
                        break;
                    }
                    num = andPinCell.NextCell;
                    if (disposable != null)
                    {
                        disposable.Dispose();
                    }
                }while (num2 != this.m_lastCellKey);
            }
        }
Beispiel #3
0
        private void Traverse(ProcessingStages operation, AggregateUpdateContext aggContext)
        {
            if (this.m_grouping != null)
            {
                this.m_grouping.Traverse(ProcessingStages.SortAndFilter, true, aggContext);
            }
            if (this.m_hierarchyObjs != null)
            {
                for (int i = 0; i < this.m_hierarchyObjs.Count; i++)
                {
                    IReference <RuntimeHierarchyObj> reference = this.m_hierarchyObjs[i];
                    using (reference.PinValue())
                    {
                        switch (operation)
                        {
                        case ProcessingStages.SortAndFilter:
                            reference.Value().SortAndFilter(aggContext);
                            break;

                        case ProcessingStages.UpdateAggregates:
                            reference.Value().UpdateAggregates(aggContext);
                            break;
                        }
                    }
                }
            }
        }
        private void Traverse(ProcessingStages operation, AggregateUpdateContext context)
        {
            for (int i = 0; i < this.m_dataRegionObjs.Count; i++)
            {
                RuntimeDataRegionObjReference runtimeDataRegionObjReference = this.m_dataRegionObjs[i];
                if ((BaseReference)runtimeDataRegionObjReference != (object)null)
                {
                    using (runtimeDataRegionObjReference.PinValue())
                    {
                        switch (operation)
                        {
                        case ProcessingStages.SortAndFilter:
                            runtimeDataRegionObjReference.Value().SortAndFilter(context);
                            break;

                        case ProcessingStages.UpdateAggregates:
                            runtimeDataRegionObjReference.Value().UpdateAggregates(context);
                            break;

                        default:
                            Global.Tracer.Assert(false, "Unknown ProcessingStage in Traverse");
                            break;
                        }
                    }
                }
            }
        }
 private void SortAndFilter()
 {
     if (this.m_report.NeedPostGroupProcessing)
     {
         this.m_odpContext.SecondPassOperation = (SecondPassOperations)(this.m_report.HasVariables ? 1 : 0);
         if (this.m_report.HasSpecialRecursiveAggregates)
         {
             this.m_odpContext.SecondPassOperation |= SecondPassOperations.FilteringOrAggregatesOrDomainScope;
         }
         else
         {
             this.m_odpContext.SecondPassOperation |= (SecondPassOperations.Sorting | SecondPassOperations.FilteringOrAggregatesOrDomainScope);
         }
         AggregateUpdateContext aggContext = new AggregateUpdateContext(this.m_odpContext, AggregateMode.Aggregates);
         this.m_dataSetObj.EnterProcessUserSortPhase();
         this.m_odpContext.DomainScopeContext = new DomainScopeContext();
         this.m_dataSetObj.SortAndFilter(aggContext);
         this.m_odpContext.DomainScopeContext = null;
         if (this.m_report.HasSpecialRecursiveAggregates)
         {
             this.m_odpContext.SecondPassOperation = SecondPassOperations.Sorting;
             this.m_dataSetObj.SortAndFilter(aggContext);
         }
         this.m_dataSetObj.LeaveProcessUserSortPhase();
     }
 }
 public override void UpdateAggregates(AggregateUpdateContext context)
 {
     this.SetupEnvironment();
     if (RuntimeDataRegionObj.UpdateAggregatesAtScope(context, this, base.m_dataRegionDef.DataScopeInfo, AggregateUpdateFlags.Both, false))
     {
         this.Traverse(ProcessingStages.UpdateAggregates, context);
     }
 }
 private void PostSortOperations()
 {
     if (this.m_report.HasPostSortAggregates)
     {
         Dictionary <string, IReference <RuntimeGroupRootObj> > groupCollection = new Dictionary <string, IReference <RuntimeGroupRootObj> >();
         AggregateUpdateContext aggContext = new AggregateUpdateContext(this.m_odpContext, AggregateMode.PostSortAggregates);
         this.m_dataSetObj.CalculateRunningValues(groupCollection, aggContext);
     }
 }
Beispiel #8
0
 public override bool SortAndFilter(AggregateUpdateContext aggContext)
 {
     if ((SecondPassOperations.FilteringOrAggregatesOrDomainScope & base.m_odpContext.SecondPassOperation) != 0 && this.m_dataRows != null && (this.m_outerDataAction & DataActions.RecursiveAggregates) != 0)
     {
         this.ReadRows(DataActions.RecursiveAggregates, null);
         base.ReleaseDataRows(DataActions.RecursiveAggregates, ref this.m_dataAction, ref this.m_dataRows);
     }
     return(true);
 }
 public virtual void UpdateAggregates(AggregateUpdateContext aggContext)
 {
     if ((BaseReference)null != (object)this.m_groupRoot)
     {
         using (this.m_groupRoot.PinValue())
         {
             this.m_groupRoot.Value().UpdateAggregates(aggContext);
         }
     }
 }
 private void PreComputeAggregatesOfAggregates()
 {
     if (this.m_report.NeedPostGroupProcessing)
     {
         this.m_odpContext.SecondPassOperation = SecondPassOperations.FilteringOrAggregatesOrDomainScope;
         AggregateUpdateContext aggContext = new AggregateUpdateContext(this.m_odpContext, AggregateMode.Aggregates);
         this.m_odpContext.DomainScopeContext = new DomainScopeContext();
         this.m_dataSetObj.SortAndFilter(aggContext);
         this.m_odpContext.DomainScopeContext = null;
     }
 }
 public virtual bool SortAndFilter(AggregateUpdateContext aggContext)
 {
     if ((BaseReference)null != (object)this.m_groupRoot)
     {
         using (this.m_groupRoot.PinValue())
         {
             return(this.m_groupRoot.Value().SortAndFilter(aggContext));
         }
     }
     return(true);
 }
        public override bool SortAndFilter(AggregateUpdateContext aggContext)
        {
            this.SetupEnvironment();
            if (base.m_userSortTargetInfo != null)
            {
                base.m_userSortTargetInfo.EnterProcessUserSortPhase(base.m_odpContext);
            }
            bool flag = base.DataRegionDef.ProcessingInnerGrouping == AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion.ProcessingInnerGroupings.Column;

            IReference <RuntimeMemberObj>[] array  = flag ? this.m_outerGroupings : this.m_innerGroupings;
            IReference <RuntimeMemberObj>[] array2 = flag ? this.m_innerGroupings : this.m_outerGroupings;
            int rowDomainScopeCount    = base.DataRegionDef.RowDomainScopeCount;
            int columnDomainScopeCount = base.DataRegionDef.ColumnDomainScopeCount;
            DomainScopeContext   domainScopeContext = base.OdpContext.DomainScopeContext;
            AggregateUpdateQueue workQueue          = null;

            if (base.m_odpContext.HasSecondPassOperation(SecondPassOperations.FilteringOrAggregatesOrDomainScope))
            {
                workQueue = RuntimeDataRegionObj.AggregateOfAggregatesStart(aggContext, this, base.m_dataRegionDef.DataScopeInfo, base.m_aggregatesOfAggregates, AggregateUpdateFlags.Both, false);
                if (rowDomainScopeCount > 0)
                {
                    domainScopeContext.AddDomainScopes(array, array.Length - rowDomainScopeCount);
                }
                if (columnDomainScopeCount > 0)
                {
                    domainScopeContext.AddDomainScopes(array2, array2.Length - columnDomainScopeCount);
                }
            }
            this.Traverse(ProcessingStages.SortAndFilter, aggContext);
            base.SortAndFilter(aggContext);
            if (base.m_odpContext.HasSecondPassOperation(SecondPassOperations.FilteringOrAggregatesOrDomainScope))
            {
                RuntimeDataRegionObj.AggregatesOfAggregatesEnd(this, aggContext, workQueue, base.m_dataRegionDef.DataScopeInfo, base.m_aggregatesOfAggregates, true);
                if (rowDomainScopeCount > 0)
                {
                    domainScopeContext.RemoveDomainScopes(array, array.Length - rowDomainScopeCount);
                }
                if (columnDomainScopeCount > 0)
                {
                    domainScopeContext.RemoveDomainScopes(array2, array2.Length - columnDomainScopeCount);
                }
            }
            if (base.m_userSortTargetInfo != null)
            {
                base.m_userSortTargetInfo.LeaveProcessUserSortPhase(base.m_odpContext);
            }
            return(true);
        }
 protected override void CalculateRunningValuesForStaticContents(AggregateUpdateContext aggContext)
 {
     if (base.m_processHeading)
     {
         RuntimeDataTablixGroupRootObjReference runtimeDataTablixGroupRootObjReference = (RuntimeDataTablixGroupRootObjReference)base.m_hierarchyRoot;
         using (runtimeDataTablixGroupRootObjReference.PinValue())
         {
             RuntimeDataTablixGroupRootObj runtimeDataTablixGroupRootObj            = runtimeDataTablixGroupRootObjReference.Value();
             Dictionary <string, IReference <RuntimeGroupRootObj> > groupCollection = runtimeDataTablixGroupRootObj.GroupCollection;
             RuntimeGroupRootObjReference lastGroup = runtimeDataTablixGroupRootObjReference;
             if (this.m_groupScopedItems != null)
             {
                 this.m_groupScopedItems.CalculateRunningValues(groupCollection, lastGroup, aggContext);
             }
         }
     }
 }
 public static void AggregatesOfAggregatesEnd(IScope scopeObj, AggregateUpdateContext aggContext, AggregateUpdateQueue workQueue, DataScopeInfo dataScopeInfo, BucketedDataAggregateObjs aggregatesOfAggregates, bool updateAggsIfNeeded)
 {
     if (dataScopeInfo != null)
     {
         if (updateAggsIfNeeded)
         {
             while (aggContext.AdvanceQueue(workQueue))
             {
                 scopeObj.UpdateAggregates(aggContext);
             }
         }
         aggContext.RestoreOriginalState(workQueue);
         if (aggContext.Mode == AggregateMode.Aggregates && dataScopeInfo.NeedsSeparateAofAPass && updateAggsIfNeeded)
         {
             scopeObj.UpdateAggregates(aggContext);
         }
     }
 }
 public override void ReadRow(DataActions dataAction, ITraversalContext context)
 {
     if (DataActions.UserSort == dataAction)
     {
         RuntimeDataRegionObj.CommonFirstRow(base.m_odpContext, ref base.m_firstRowIsAggregate, ref base.m_firstRow);
         base.CommonNextRow(base.m_dataRows);
     }
     else if (DataActions.AggregatesOfAggregates == dataAction)
     {
         AggregateUpdateContext aggregateUpdateContext = (AggregateUpdateContext)context;
         aggregateUpdateContext.UpdateAggregatesForRow();
     }
     else
     {
         if (FlagUtils.HasFlag(dataAction, DataActions.PostSortAggregatesOfAggregates))
         {
             AggregateUpdateContext aggregateUpdateContext2 = (AggregateUpdateContext)context;
             aggregateUpdateContext2.UpdateAggregatesForRow();
         }
         if (!base.m_dataRegionDef.ProcessCellRunningValues)
         {
             if (FlagUtils.HasFlag(dataAction, DataActions.PostSortAggregates))
             {
                 if (base.m_postSortAggregates != null)
                 {
                     RuntimeDataRegionObj.UpdateAggregates(base.m_odpContext, base.m_postSortAggregates, false);
                 }
                 if (base.m_runningValues != null)
                 {
                     RuntimeDataTablixObj.UpdateRunningValues(base.m_odpContext, base.m_runningValues);
                 }
             }
             if (base.m_outerScope != null && (dataAction & base.m_outerDataAction) != 0)
             {
                 using (base.m_outerScope.PinValue())
                 {
                     IScope scope = base.m_outerScope.Value();
                     scope.ReadRow(dataAction, context);
                 }
             }
         }
     }
 }
        protected override void TraverseStaticContents(ProcessingStages operation, AggregateUpdateContext context)
        {
            if (this.m_groupScopedItems != null)
            {
                switch (operation)
                {
                case ProcessingStages.SortAndFilter:
                    this.m_groupScopedItems.SortAndFilter(context);
                    break;

                case ProcessingStages.UpdateAggregates:
                    this.m_groupScopedItems.UpdateAggregates(context);
                    break;

                default:
                    Global.Tracer.Assert(false, "Unknown operation in TraverseStaticContents.");
                    break;
                }
            }
        }
        protected override void TraverseCellContents(ProcessingStages operation, AggregateUpdateContext context)
        {
            if (this.m_cellContents != null)
            {
                switch (operation)
                {
                case ProcessingStages.SortAndFilter:
                    this.m_cellContents.SortAndFilter(context);
                    break;

                case ProcessingStages.UpdateAggregates:
                    this.m_cellContents.UpdateAggregates(context);
                    break;

                default:
                    Global.Tracer.Assert(false, "Invalid operation for TraverseCellContents.");
                    break;
                }
            }
        }
        public static AggregateUpdateQueue AggregateOfAggregatesStart(AggregateUpdateContext aggContext, IDataRowHolder scope, DataScopeInfo dataScopeInfo, BucketedDataAggregateObjs aggregatesOfAggregates, AggregateUpdateFlags updateFlags, bool needsSetupEnvironment)
        {
            if (dataScopeInfo == null)
            {
                return(null);
            }
            AggregateUpdateQueue result = null;

            if (aggContext.Mode == AggregateMode.Aggregates)
            {
                if (dataScopeInfo.NeedsSeparateAofAPass)
                {
                    result = aggContext.ReplaceAggregatesToUpdate(aggregatesOfAggregates);
                }
                else
                {
                    result = aggContext.RegisterAggregatesToUpdate(aggregatesOfAggregates);
                    if (updateFlags != 0)
                    {
                        RuntimeDataRegionObj.UpdateAggregatesAtScope(aggContext, scope, dataScopeInfo, updateFlags, needsSetupEnvironment);
                    }
                }
            }
            else if (aggContext.Mode == AggregateMode.PostSortAggregates)
            {
                result = aggContext.RegisterAggregatesToUpdate(aggregatesOfAggregates);
                result = aggContext.RegisterRunningValuesToUpdate(result, dataScopeInfo.RunningValuesOfAggregates);
                if (updateFlags != 0)
                {
                    RuntimeDataRegionObj.UpdateAggregatesAtScope(aggContext, scope, dataScopeInfo, updateFlags, needsSetupEnvironment);
                }
            }
            else
            {
                Global.Tracer.Assert(false, "Unknown AggregateMode for AggregateOfAggregatesStart");
            }
            return(result);
        }
Beispiel #19
0
 public virtual void CalculateRunningValues(AggregateUpdateContext aggContext)
 {
     if (this.m_grouping != null)
     {
         this.m_grouping.Traverse(ProcessingStages.RunningValues, this.m_expression == null || this.m_expression.Direction, aggContext);
     }
     if (this.m_hierarchyObjs != null)
     {
         bool flag = true;
         for (int i = 0; i < this.m_hierarchyObjs.Count; i++)
         {
             IReference <RuntimeHierarchyObj> reference = this.m_hierarchyObjs[i];
             using (reference.PinValue())
             {
                 RuntimeHierarchyObj runtimeHierarchyObj = reference.Value();
                 if (!flag || runtimeHierarchyObj is RuntimeGroupLeafObj)
                 {
                     ((RuntimeGroupLeafObj)runtimeHierarchyObj).TraverseAllLeafNodes(ProcessingStages.RunningValues, aggContext);
                     flag = false;
                 }
             }
         }
     }
 }
 public static bool UpdateAggregatesAtScope(AggregateUpdateContext aggContext, IDataRowHolder scope, DataScopeInfo scopeInfo, AggregateUpdateFlags updateFlags, bool needsSetupEnvironment)
 {
     return(aggContext.UpdateAggregates(scopeInfo, scope, updateFlags, needsSetupEnvironment));
 }
 protected virtual void CalculateRunningValuesForTopLevelStaticContents(Dictionary <string, IReference <RuntimeGroupRootObj> > groupCol, IReference <RuntimeGroupRootObj> lastGroup, AggregateUpdateContext aggContext)
 {
 }
 public abstract void CalculateRunningValues(Dictionary <string, IReference <RuntimeGroupRootObj> > groupCol, IReference <RuntimeGroupRootObj> lastGroup, AggregateUpdateContext aggContext);
 public abstract void UpdateAggregates(AggregateUpdateContext context);
 public void CalculateRunningValues(Dictionary <string, IReference <RuntimeGroupRootObj> > groupCollection, IReference <RuntimeGroupRootObj> lastGroup, AggregateUpdateContext aggContext)
 {
     for (int i = 0; i < this.m_dataRegionObjs.Count; i++)
     {
         RuntimeDataRegionObjReference runtimeDataRegionObjReference = this.m_dataRegionObjs[i];
         if ((BaseReference)runtimeDataRegionObjReference != (object)null)
         {
             using (runtimeDataRegionObjReference.PinValue())
             {
                 runtimeDataRegionObjReference.Value().CalculateRunningValues(groupCollection, lastGroup, aggContext);
             }
         }
     }
 }
 public abstract bool SortAndFilter(AggregateUpdateContext aggContext);
 public void UpdateAggregates(AggregateUpdateContext aggContext)
 {
     this.Traverse(ProcessingStages.UpdateAggregates, aggContext);
 }
Beispiel #27
0
 protected override void CalculateRunningValuesForTopLevelStaticContents(Dictionary <string, IReference <RuntimeGroupRootObj> > groupCol, IReference <RuntimeGroupRootObj> lastGroup, AggregateUpdateContext aggContext)
 {
     if (this.m_dataRegionScopedItems != null)
     {
         this.m_dataRegionScopedItems.CalculateRunningValues(groupCol, lastGroup, aggContext);
     }
 }
 public void SortAndFilter(AggregateUpdateContext aggContext)
 {
     this.Traverse(ProcessingStages.SortAndFilter, aggContext);
 }
Beispiel #29
0
 public override bool SortAndFilter(AggregateUpdateContext aggContext)
 {
     this.Traverse(ProcessingStages.SortAndFilter, aggContext);
     return(true);
 }
Beispiel #30
0
 public override void CalculateRunningValues(Dictionary <string, IReference <RuntimeGroupRootObj> > groupCol, IReference <RuntimeGroupRootObj> lastGroup, AggregateUpdateContext aggContext)
 {
     Global.Tracer.Assert(false);
 }