Ejemplo n.º 1
0
        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 static void MergeDataProcessingItem(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem item, ref List <AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem> results)
        {
            if (item != null)
            {
                if (item.IsDataRegion)
                {
                    RuntimeRICollection.AddItem(item, ref results);
                }
                else
                {
                    switch (item.ObjectType)
                    {
                    case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Rectangle:
                    {
                        AspNetCore.ReportingServices.ReportIntermediateFormat.Rectangle rectangle = (AspNetCore.ReportingServices.ReportIntermediateFormat.Rectangle)item;
                        RuntimeRICollection.MergeDataProcessingItems(rectangle.ReportItems.ComputedReportItems, ref results);
                        break;
                    }

                    case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Subreport:
                    case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Map:
                        RuntimeRICollection.AddItem(item, ref results);
                        break;
                    }
                }
            }
        }
 public void CreateAllDataRegionInstances(ScopeInstance parentInstance, OnDemandProcessingContext odpContext, IReference <IScope> owner)
 {
     for (int i = 0; i < this.m_dataRegionObjs.Count; i++)
     {
         RuntimeRICollection.CreateDataRegionInstance(parentInstance, odpContext, this.m_dataRegionObjs[i]);
     }
     this.m_dataRegionObjs = null;
 }
 public static void MergeDataProcessingItems(List <AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem> candidateItems, ref List <AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem> results)
 {
     if (candidateItems != null)
     {
         for (int i = 0; i < candidateItems.Count; i++)
         {
             AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem item = candidateItems[i];
             RuntimeRICollection.MergeDataProcessingItem(item, ref results);
         }
     }
 }
Ejemplo n.º 5
0
        protected override void ConstructRuntimeStructure(ref DataActions innerDataAction, bool onePassProcess)
        {
            this.m_dataRegionScopedItems = null;
            base.ConstructRuntimeStructure(ref innerDataAction, onePassProcess);
            List <AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem> dataRegionScopedItems = this.GetDataRegionScopedItems();

            if (dataRegionScopedItems != null)
            {
                this.m_dataRegionScopedItems = new RuntimeRICollection((IReference <IScope>)base.m_selfReference, dataRegionScopedItems, ref innerDataAction, base.m_odpContext);
            }
        }
        protected override void InitializeGroupScopedItems(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode member, ref DataActions innerDataAction)
        {
            List <AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem> groupScopedContents = this.GetGroupScopedContents(member);

            if (groupScopedContents != null)
            {
                if (this.m_groupScopedItems == null)
                {
                    this.m_groupScopedItems = new RuntimeRICollection(groupScopedContents.Count);
                }
                this.m_groupScopedItems.AddItems((IReference <IScope>)base.m_selfReference, groupScopedContents, ref innerDataAction, base.m_odpContext);
            }
        }
        protected override void ConstructCellContents(Cell cell, ref DataActions dataAction)
        {
            List <AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem> cellContents = this.GetCellContents(cell);

            if (cellContents != null)
            {
                base.m_owner.Value().OdpContext.TablixProcessingScalabilityCache.AllocateAndPin((RuntimeCell)this, base.m_outerGroupDynamicIndex);
                if (this.m_cellContents == null)
                {
                    this.m_cellContents = new RuntimeRICollection(cellContents.Count);
                }
                this.m_cellContents.AddItems((IReference <IScope>)base.m_selfReference, cellContents, ref dataAction, base.m_owner.Value().OdpContext);
            }
        }
        protected override void ConstructOutermostCellContents(Cell cell)
        {
            List <AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem> cellContents = this.GetCellContents(cell);

            if (cellContents != null)
            {
                DataActions dataActions = DataActions.None;
                if (this.m_groupScopedItems == null)
                {
                    this.m_groupScopedItems = new RuntimeRICollection(cellContents.Count);
                }
                this.m_groupScopedItems.AddItems(base.m_selfReference, cellContents, ref dataActions, base.m_odpContext);
            }
        }
Ejemplo n.º 9
0
 public override void Deserialize(IntermediateFormatReader reader)
 {
     base.Deserialize(reader);
     reader.RegisterDeclaration(RuntimeDataTablixWithScopedItemsObj.m_declaration);
     while (reader.NextMember())
     {
         MemberName memberName = reader.CurrentMember.MemberName;
         if (memberName == MemberName.DataRegionScopedItems)
         {
             this.m_dataRegionScopedItems = (RuntimeRICollection)reader.ReadRIFObject();
         }
         else
         {
             Global.Tracer.Assert(false, "Unsupported member name: " + reader.CurrentMember.MemberName + ".");
         }
     }
 }
        private void CreateInstance(ScopeInstance parentInstance, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem reportItem, OnDemandProcessingContext odpContext, IReference <IScope> owner)
        {
            if (reportItem != null)
            {
                if (reportItem.IsDataRegion)
                {
                    AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegion = (AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion)reportItem;
                    RuntimeDataRegionObjReference dataRegionObjRef = this.m_dataRegionObjs[dataRegion.IndexInCollection];
                    RuntimeRICollection.CreateDataRegionInstance(parentInstance, odpContext, dataRegionObjRef);
                }
                else
                {
                    switch (reportItem.ObjectType)
                    {
                    case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Subreport:
                        this.CreateSubReportInstance((AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport)reportItem, parentInstance, odpContext, owner);
                        break;

                    case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Rectangle:
                    {
                        AspNetCore.ReportingServices.ReportIntermediateFormat.Rectangle rectangle = (AspNetCore.ReportingServices.ReportIntermediateFormat.Rectangle)reportItem;
                        this.CreateInstances(parentInstance, odpContext, owner, rectangle.ReportItems.ComputedReportItems);
                        break;
                    }

                    case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Map:
                    {
                        Map map = (Map)reportItem;
                        List <MapDataRegion> mapDataRegions = map.MapDataRegions;
                        for (int i = 0; i < mapDataRegions.Count; i++)
                        {
                            this.CreateInstance(parentInstance, mapDataRegions[i], odpContext, owner);
                        }
                        break;
                    }
                    }
                }
            }
        }
        public override void CalculateRunningValues(Dictionary <string, IReference <RuntimeGroupRootObj> > groupCol, IReference <RuntimeGroupRootObj> lastGroup, AggregateUpdateContext aggContext)
        {
            if (base.m_dataRegionDef.RunningValues != null && base.m_runningValues == null && base.m_previousValues == null)
            {
                RuntimeDataTablixObj.AddRunningValues(base.m_odpContext, base.m_dataRegionDef.RunningValues, ref base.m_runningValues, ref base.m_previousValues, groupCol, lastGroup);
            }
            if (base.m_dataRegionDef.DataScopeInfo != null)
            {
                List <string> list  = null;
                List <string> list2 = null;
                RuntimeDataTablixObj.AddRunningValues(base.m_odpContext, base.m_dataRegionDef.DataScopeInfo.RunningValuesOfAggregates, ref list, ref list2, groupCol, lastGroup);
            }
            bool flag = base.m_dataRows != null && FlagUtils.HasFlag(base.m_dataAction, DataActions.PostSortAggregates);
            AggregateUpdateQueue workQueue = RuntimeDataRegionObj.AggregateOfAggregatesStart(aggContext, this, base.m_dataRegionDef.DataScopeInfo, base.m_postSortAggregatesOfAggregates, (AggregateUpdateFlags)(flag ? 1 : 3), true);

            if (flag)
            {
                DataActions dataActions = DataActions.PostSortAggregates;
                if (aggContext.LastScopeNeedsRowAggregateProcessing())
                {
                    dataActions |= DataActions.PostSortAggregatesOfAggregates;
                }
                base.ReadRows(dataActions, aggContext);
                base.m_dataRows = null;
            }
            int num = (this.m_outerGroupings != null) ? this.m_outerGroupings.Length : 0;

            if (num == 0)
            {
                if (this.m_innerGroupings != null)
                {
                    for (int i = 0; i < this.m_innerGroupings.Length; i++)
                    {
                        IReference <RuntimeMemberObj> reference = this.m_innerGroupings[i];
                        using (reference.PinValue())
                        {
                            reference.Value().CalculateRunningValues(groupCol, lastGroup, aggContext);
                        }
                    }
                }
            }
            else
            {
                for (int j = 0; j < num; j++)
                {
                    IReference <RuntimeMemberObj> reference2 = this.m_outerGroupings[j];
                    bool flag2 = default(bool);
                    using (reference2.PinValue())
                    {
                        RuntimeMemberObj runtimeMemberObj = reference2.Value();
                        runtimeMemberObj.CalculateRunningValues(groupCol, lastGroup, aggContext);
                        flag2 = ((BaseReference)runtimeMemberObj.GroupRoot == (object)null);
                    }
                    if (flag2 && this.m_innerGroupings != null)
                    {
                        for (int k = 0; k < this.m_innerGroupings.Length; k++)
                        {
                            IReference <RuntimeMemberObj> reference3 = this.m_innerGroupings[k];
                            using (reference3.PinValue())
                            {
                                RuntimeMemberObj runtimeMemberObj2 = reference3.Value();
                                runtimeMemberObj2.PrepareCalculateRunningValues();
                                runtimeMemberObj2.CalculateRunningValues(groupCol, lastGroup, aggContext);
                            }
                        }
                    }
                }
            }
            this.CalculateRunningValuesForTopLevelStaticContents(groupCol, lastGroup, aggContext);
            RuntimeDataRegionObj.AggregatesOfAggregatesEnd(this, aggContext, workQueue, base.m_dataRegionDef.DataScopeInfo, base.m_postSortAggregatesOfAggregates, true);
            this.CalculateDRPreviousAggregates();
            RuntimeRICollection.StoreRunningValues(base.m_odpContext.ReportObjectModel.AggregatesImpl, base.m_dataRegionDef.RunningValues, ref base.m_runningValueValues);
            if (base.m_dataRegionDef.DataScopeInfo != null)
            {
                RuntimeRICollection.StoreRunningValues(base.m_odpContext.ReportObjectModel.AggregatesImpl, base.m_dataRegionDef.DataScopeInfo.RunningValuesOfAggregates, ref base.m_runningValueOfAggregateValues);
            }
        }
 private void CreateRuntimeStructure()
 {
     this.m_runtimeDataRegions = new RuntimeRICollection(this.m_selfReference, this.m_dataSet.DataRegions, this.m_odpContext, this.m_odpContext.ReportDefinition.MergeOnePass);
 }