Example #1
0
 private void NeedProcessDataActions(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode memberDefinition)
 {
     if (memberDefinition != null)
     {
         this.NeedProcessDataActions(memberDefinition.RunningValues);
     }
 }
Example #2
0
 public Group(CustomReportItem owner, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode memberDef, DataRegionMember dataMember)
 {
     this.m_isOldSnapshot = false;
     this.m_criOwner      = owner;
     this.m_memberDef     = memberDef;
     this.m_dataMember    = dataMember;
 }
Example #3
0
 public ScopeIDContext(ScopeID scopeID, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode memberDef, InternalStreamingOdpDynamicMemberLogic memberLogic, RestartMode restartMode)
     : base(restartMode)
 {
     this.m_scopeID     = scopeID;
     this.m_memberDef   = memberDef;
     this.m_memberLogic = memberLogic;
 }
Example #4
0
 private bool IsParentScopeIDAlreadySet(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode target)
 {
     if (this.m_queryRestartPosition.Count == 0)
     {
         return(!this.ParentScopeIsDynamic(target));
     }
     return(this.IsParentScopeAdded(target));
 }
        protected static RuntimeDataTablixGroupRootObjReference GetGroupRoot(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode rifMember, IReference <RuntimeMemberObj>[] memberCol)
        {
            Global.Tracer.Assert(!rifMember.IsStatic, "Cannot GetGroupRoot of a static member");
            IReference <RuntimeMemberObj> reference = memberCol[rifMember.IndexInCollection];
            RuntimeMemberObj runtimeMemberObj       = reference.Value();

            return(runtimeMemberObj.GroupRoot);
        }
Example #6
0
 public bool TryAddScopeID(ScopeID scopeID, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode memberDef, InternalStreamingOdpDynamicMemberLogic memberLogic)
 {
     if (this.IsParentScopeIDAlreadySet(memberDef))
     {
         RestartMode restartMode = (RestartMode)((!this.CanMarkRestartable(memberDef)) ? 1 : 0);
         this.m_queryRestartPosition.Add(new ScopeIDContext(scopeID, memberDef, memberLogic, restartMode));
         return(true);
     }
     return(false);
 }
        private void AddGroupScope(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode member, ref FunctionalList <ScopeTreeNode> axisScopes)
        {
            ScopeTreeNode scopeTreeNode = default(ScopeTreeNode);

            if (!this.m_scopes.TryGetValue((IRIFDataScope)member, out scopeTreeNode))
            {
                scopeTreeNode = (this.HasScope(axisScopes) ? new SubScopeNode(member, this.m_activeScopes.First) : new SubScopeNode(member, this.m_dataRegionScopes.First));
            }
            this.AddScope(scopeTreeNode);
            axisScopes = axisScopes.Add(scopeTreeNode);
        }
 public void UnRegisterGrouping(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode member)
 {
     if (member.IsColumn)
     {
         this.RemoveGroupScope(ref this.m_activeColumnScopes);
     }
     else
     {
         this.RemoveGroupScope(ref this.m_activeRowScopes);
     }
 }
Example #9
0
 private bool CanMarkRestartable(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode memberDef)
 {
     if (memberDef.DataScopeInfo.IsDecomposable && memberDef.Sorting != null && memberDef.Sorting.NaturalSort)
     {
         if (this.LastScopeIDContext != null)
         {
             return(this.LastScopeIDContext.IsRowLevelRestart);
         }
         return(true);
     }
     return(false);
 }
        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);
            }
        }
Example #11
0
        public RuntimeDataTablixGroupRootObj(IReference <IScope> outerScope, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode dynamicMember, ref DataActions dataAction, OnDemandProcessingContext odpContext, IReference <RuntimeMemberObj>[] innerGroupings, bool outermostStatics, int headingLevel, AspNetCore.ReportingServices.ReportProcessing.ObjectType objectType)
            : base(outerScope, dynamicMember, dataAction, odpContext, objectType)
        {
            this.m_innerGroupings   = innerGroupings;
            this.m_headingLevel     = headingLevel;
            this.m_outermostStatics = outermostStatics;
            this.m_hasLeafCells     = false;
            HierarchyNodeList innerStaticMembersInSameScope = dynamicMember.InnerStaticMembersInSameScope;

            this.m_hasLeafCells = (!dynamicMember.HasInnerDynamic || (innerStaticMembersInSameScope != null && innerStaticMembersInSameScope.LeafCellIndexes != null));
            if (innerGroupings == null && innerStaticMembersInSameScope != null && innerStaticMembersInSameScope.LeafCellIndexes != null)
            {
                goto IL_0075;
            }
            if (innerGroupings != null && outermostStatics)
            {
                goto IL_0075;
            }
            goto IL_0084;
IL_0084:
            if (this.m_hasLeafCells && outermostStatics)
            {
                this.m_processOutermostStaticCells = true;
            }
            this.NeedProcessDataActions(dynamicMember);
            this.NeedProcessDataActions(dynamicMember.InnerStaticMembersInSameScope);
            if (dynamicMember.Grouping.Filters == null)
            {
                dataAction = DataActions.None;
            }
            if (!this.m_processOutermostStaticCells && !this.m_processStaticCellsForRVs)
            {
                return;
            }
            if (dynamicMember.DataRegionDef.CellPostSortAggregates == null && dynamicMember.DataRegionDef.CellRunningValues == null)
            {
                return;
            }
            base.m_dataAction |= DataActions.PostSortAggregates;
            return;

IL_0075:
            if (this.m_hasLeafCells)
            {
                this.m_processStaticCellsForRVs = true;
            }
            goto IL_0084;
        }
 private IReference <RuntimeMemberObj>[] GetMemberCollection(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode rifMember)
 {
     if (base.m_dataRegionDef.ProcessingInnerGrouping == AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion.ProcessingInnerGroupings.Column)
     {
         if (rifMember.IsColumn)
         {
             return(this.m_innerGroupings);
         }
         return(this.m_outerGroupings);
     }
     if (rifMember.IsColumn)
     {
         return(this.m_outerGroupings);
     }
     return(this.m_innerGroupings);
 }
        protected static IOnDemandMemberInstanceReference GetFirstMemberInstance(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode rifMember, IReference <RuntimeMemberObj>[] memberCol)
        {
            IOnDemandMemberInstanceReference       result    = null;
            RuntimeDataTablixGroupRootObjReference groupRoot = RuntimeDataRegionObj.GetGroupRoot(rifMember, memberCol);

            using (groupRoot.PinValue())
            {
                RuntimeDataTablixGroupRootObj runtimeDataTablixGroupRootObj = groupRoot.Value();
                RuntimeGroupLeafObjReference  firstChild = runtimeDataTablixGroupRootObj.FirstChild;
                if ((BaseReference)firstChild != (object)null)
                {
                    return((IOnDemandMemberInstanceReference)firstChild);
                }
                return(result);
            }
        }
Example #14
0
        private RuntimeDataTablixMemberObj(IReference <IScope> owner, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode dynamicMember, ref DataActions dataAction, OnDemandProcessingContext odpContext, IReference <RuntimeMemberObj>[] innerGroupings, HierarchyNodeList staticMembers, bool outerMostStatics, int headingLevel, AspNetCore.ReportingServices.ReportProcessing.ObjectType objectType)
            : base(owner, dynamicMember)
        {
            int excludedCellIndex = -1;

            if (dynamicMember != null)
            {
                excludedCellIndex = dynamicMember.MemberCellIndex;
                RuntimeDataTablixGroupRootObj runtimeDataTablixGroupRootObj = new RuntimeDataTablixGroupRootObj(owner, dynamicMember, ref dataAction, odpContext, innerGroupings, outerMostStatics, headingLevel, objectType);
                base.m_groupRoot = (RuntimeDataTablixGroupRootObjReference)runtimeDataTablixGroupRootObj.SelfReference;
                base.m_groupRoot.UnPinValue();
            }
            if (staticMembers != null && staticMembers.Count != 0)
            {
                int count = staticMembers.Count;
                this.m_hasStaticMembers      = true;
                this.m_staticLeafCellIndexes = staticMembers.GetLeafCellIndexes(excludedCellIndex);
            }
        }
Example #15
0
 private bool IsParentScopeAdded(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode target)
 {
     if (target.DataScopeInfo.DataSet != this.LastScopeIDContext.MemberDefinition.DataScopeInfo.DataSet && !target.IsChildScopeOf(this.LastScopeIDContext.MemberDefinition) && !this.LastScopeIDContext.MemberDefinition.IsChildScopeOf(target))
     {
         return(true);
     }
     if (target.IsChildScopeOf(this.LastScopeIDContext.MemberDefinition))
     {
         return(true);
     }
     if (!target.DataScopeInfo.IsDecomposable)
     {
         for (int num = this.m_queryRestartPosition.Count - 2; num >= 0; num--)
         {
             if (target.IsChildScopeOf(this.m_queryRestartPosition[num].MemberDefinition))
             {
                 return(true);
             }
         }
         return(false);
     }
     return(false);
 }
 protected override RuntimeCell CreateCell(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode outerGroupingMember, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode innerGroupingMember)
 {
     return(new RuntimeTablixCell((RuntimeTablixGroupLeafObjReference)base.m_selfReference, (TablixMember)outerGroupingMember, (TablixMember)innerGroupingMember, !base.m_hasInnerHierarchy));
 }
        protected override List <AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem> GetGroupScopedContents(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode member)
        {
            TablixMember tablixMember = (TablixMember)member;

            return(tablixMember.GroupScopedContentsForProcessing);
        }
        private void SetupObjectModels(OnDemandMode mode, bool needDeepCopyPath, int moveNextInstanceIndex, string scopeName)
        {
            AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegionInstance dataRegionInstance = null;
            IMemberHierarchy memberHierarchy         = null;
            int                     num              = -1;
            ScopeInstance           scopeInstance    = base.m_odpContext.CurrentReportInstance;
            List <InstancePathItem> lastInstancePath = this.m_lastInstancePath;
            List <InstancePathItem> list             = null;
            int                     num2             = 0;

            AspNetCore.ReportingServices.ReportIntermediateFormat.Report reportDefinition = base.m_odpContext.ReportDefinition;
            ObjectModelImpl reportObjectModel = base.m_odpContext.ReportObjectModel;
            bool            flag  = false;
            bool            flag2 = false;
            int             num3  = 0;

            try
            {
                if (this.m_lastRIFObject.InstancePath != null)
                {
                    list = this.m_lastRIFObject.InstancePath;
                    num2 = list.Count;
                }
                if (mode != OnDemandMode.InScope)
                {
                    base.m_odpContext.EnsureCultureIsSetOnCurrentThread();
                }
                if (mode != OnDemandMode.InScope || 1 != reportDefinition.DataSetsNotOnlyUsedInParameters || !this.InScopeCompare(reportDefinition.FirstDataSet.Name, scopeName))
                {
                    int num4 = 0;
                    if (base.m_odpContext.InSubreport)
                    {
                        num4 = InstancePathItem.GetParentReportIndex(this.m_lastRIFObject.InstancePath, this.m_lastRIFObject.InstancePathItem.Type == InstancePathItemType.SubReport);
                    }
                    bool flag3           = default(bool);
                    int  sharedPathIndex = InstancePathItem.GetSharedPathIndex(num4, lastInstancePath, list, reportObjectModel.AllFieldsCleared, out flag3);
                    for (int i = this.m_specialLastGroupingValues.Count; i < num4; i++)
                    {
                        this.m_specialLastGroupingValues.Add(null);
                    }
                    for (int j = num4; j < num2; j++)
                    {
                        InstancePathItem instancePathItem = list[j];
                        bool             flag4            = false;
                        if (mode != OnDemandMode.InScope)
                        {
                            flag4 = (j <= sharedPathIndex);
                        }
                        if (!flag4 && mode == OnDemandMode.FullSetup)
                        {
                            if (this.m_specialLastGroupingValues.Count < num2)
                            {
                                this.m_specialLastGroupingValues.Add(null);
                            }
                            else
                            {
                                this.m_specialLastGroupingValues[j] = null;
                            }
                        }
                        switch (instancePathItem.Type)
                        {
                        case InstancePathItemType.SubReport:
                            if (scopeInstance.SubreportInstances != null && instancePathItem.IndexInCollection < scopeInstance.SubreportInstances.Count)
                            {
                                IReference <AspNetCore.ReportingServices.ReportIntermediateFormat.SubReportInstance> reference = scopeInstance.SubreportInstances[instancePathItem.IndexInCollection];
                                using (reference.PinValue())
                                {
                                    AspNetCore.ReportingServices.ReportIntermediateFormat.SubReportInstance subReportInstance = reference.Value();
                                    subReportInstance.SubReportDef.CurrentSubReportInstance = reference;
                                    if (mode != OnDemandMode.InScope && !subReportInstance.Initialized)
                                    {
                                        if (base.m_odpContext.IsTablixProcessingMode || base.m_odpContext.IsTopLevelSubReportProcessing)
                                        {
                                            return;
                                        }
                                        SubReportInitializer.InitializeSubReport(subReportInstance.SubReportDef);
                                        reference.PinValue();
                                    }
                                    Global.Tracer.Assert(j == num2 - 1, "SubReport not last in instance path.");
                                }
                            }
                            goto default;

                        case InstancePathItemType.DataRegion:
                            if (scopeInstance is AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance && (scopeInstance.DataRegionInstances == null || scopeInstance.DataRegionInstances.Count <= instancePathItem.IndexInCollection || scopeInstance.DataRegionInstances[instancePathItem.IndexInCollection] == null || scopeInstance.DataRegionInstances[instancePathItem.IndexInCollection].Value() == null))
                            {
                                Global.Tracer.Assert(instancePathItem.IndexInCollection < reportDefinition.TopLevelDataRegions.Count, "(newItem.IndexInCollection < m_reportDefinition.TopLevelDataRegions.Count)");
                                AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegion = reportDefinition.TopLevelDataRegions[instancePathItem.IndexInCollection];
                                AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet    dataSet    = dataRegion.GetDataSet(reportDefinition);
                                if (mode == OnDemandMode.InScope && this.InScopeCompare(dataSet.Name, scopeName))
                                {
                                    return;
                                }
                                this.PerformOnDemandTablixProcessing(dataSet);
                            }
                            scopeInstance      = scopeInstance.DataRegionInstances[instancePathItem.IndexInCollection].Value();
                            flag               = (this.m_inRecursiveColumnHierarchy = false);
                            flag2              = (this.m_inRecursiveRowHierarchy = false);
                            num                = -1;
                            dataRegionInstance = (scopeInstance as AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegionInstance);
                            memberHierarchy    = dataRegionInstance;
                            if (mode == OnDemandMode.InScope && this.InScopeCompare(dataRegionInstance.DataRegionDef.Name, scopeName))
                            {
                                return;
                            }
                            if (dataRegionInstance.DataSetIndexInCollection >= 0 && base.m_odpContext.CurrentDataSetIndex != dataRegionInstance.DataSetIndexInCollection && mode != OnDemandMode.InScope)
                            {
                                if (!flag4)
                                {
                                    AspNetCore.ReportingServices.ReportIntermediateFormat.DataSetInstance dataSetInstance = base.m_odpContext.CurrentReportInstance.GetDataSetInstance(dataRegionInstance.DataSetIndexInCollection, base.m_odpContext);
                                    if (dataSetInstance != null)
                                    {
                                        dataSetInstance.SetupEnvironment(base.m_odpContext, true);
                                        num3 = 0;
                                    }
                                }
                                else
                                {
                                    num3 = j + 1;
                                }
                            }
                            if (mode != OnDemandMode.InScope)
                            {
                                if (!flag4)
                                {
                                    dataRegionInstance.SetupEnvironment(base.m_odpContext);
                                    num3 = 0;
                                    if (!dataRegionInstance.NoRows)
                                    {
                                        dataRegionInstance.DataRegionDef.NoRows = false;
                                        goto default;
                                    }
                                    dataRegionInstance.DataRegionDef.NoRows = true;
                                    dataRegionInstance.DataRegionDef.ResetTopLevelDynamicMemberInstanceCount();
                                    return;
                                }
                                num3 = j + 1;
                            }
                            goto default;

                        case InstancePathItemType.ColumnMemberInstanceIndexTopMost:
                            scopeInstance = dataRegionInstance;
                            goto default;

                        case InstancePathItemType.Cell:
                        {
                            if (-1 == num)
                            {
                                num = 0;
                            }
                            IList <AspNetCore.ReportingServices.ReportIntermediateFormat.DataCellInstance> cellInstances = memberHierarchy.GetCellInstances(num);
                            if (cellInstances == null)
                            {
                                if (flag2 && flag)
                                {
                                    reportObjectModel.ResetFieldValues();
                                }
                            }
                            else if (cellInstances.Count > instancePathItem.IndexInCollection)
                            {
                                AspNetCore.ReportingServices.ReportIntermediateFormat.DataCellInstance dataCellInstance = cellInstances[instancePathItem.IndexInCollection];
                                if (dataCellInstance != null)
                                {
                                    scopeInstance = dataCellInstance;
                                    if (!flag4)
                                    {
                                        dataCellInstance.SetupEnvironment(base.m_odpContext, base.m_odpContext.CurrentDataSetIndex);
                                        num3 = 0;
                                    }
                                    else
                                    {
                                        num3 = j + 1;
                                    }
                                }
                            }
                            goto default;
                        }

                        default:
                            if (instancePathItem.IsDynamicMember)
                            {
                                IList <DataRegionMemberInstance> childMemberInstances = ((IMemberHierarchy)scopeInstance).GetChildMemberInstances(instancePathItem.Type == InstancePathItemType.RowMemberInstanceIndex, instancePathItem.IndexInCollection);
                                if (childMemberInstances == null)
                                {
                                    reportObjectModel.ResetFieldValues();
                                    return;
                                }
                                int num5 = (j != num2 - 1 || moveNextInstanceIndex < 0 || moveNextInstanceIndex >= childMemberInstances.Count) ? ((instancePathItem.InstanceIndex >= 0) ? instancePathItem.InstanceIndex : 0) : moveNextInstanceIndex;
                                if (num5 >= childMemberInstances.Count)
                                {
                                    instancePathItem.ResetContext();
                                    num5 = 0;
                                }
                                DataRegionMemberInstance dataRegionMemberInstance = childMemberInstances[num5];
                                if (mode == OnDemandMode.FullSetup)
                                {
                                    dataRegionMemberInstance.MemberDef.InstanceCount      = childMemberInstances.Count;
                                    dataRegionMemberInstance.MemberDef.CurrentMemberIndex = num5;
                                }
                                scopeInstance             = dataRegionMemberInstance;
                                this.m_lastRecursiveLevel = dataRegionMemberInstance.RecursiveLevel;
                                AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode memberDef = dataRegionMemberInstance.MemberDef;
                                if (mode == OnDemandMode.InScope && this.InScopeCompare(memberDef.Grouping.Name, scopeName))
                                {
                                    return;
                                }
                                if (instancePathItem.Type == InstancePathItemType.RowMemberInstanceIndex)
                                {
                                    memberHierarchy = dataRegionMemberInstance;
                                    flag2           = true;
                                }
                                else
                                {
                                    num  = dataRegionMemberInstance.MemberInstanceIndexWithinScopeLevel;
                                    flag = true;
                                }
                                if (mode == OnDemandMode.FullSetup && !flag4)
                                {
                                    dataRegionMemberInstance.SetupEnvironment(base.m_odpContext, base.m_odpContext.CurrentDataSetIndex);
                                    num3 = 0;
                                    AspNetCore.ReportingServices.ReportIntermediateFormat.Grouping grouping = memberDef.Grouping;
                                    if (grouping.Parent != null)
                                    {
                                        if (memberDef.IsColumn)
                                        {
                                            this.m_inRecursiveColumnHierarchy = true;
                                        }
                                        else
                                        {
                                            this.m_inRecursiveRowHierarchy = true;
                                        }
                                        if (memberDef.IsTablixMember)
                                        {
                                            memberDef.SetMemberInstances(childMemberInstances);
                                            memberDef.SetRecursiveParentIndex(dataRegionMemberInstance.RecursiveParentIndex);
                                            memberDef.SetInstanceHasRecursiveChildren(dataRegionMemberInstance.HasRecursiveChildren);
                                        }
                                    }
                                    else if (memberDef.IsColumn)
                                    {
                                        this.m_inRecursiveColumnHierarchy = false;
                                    }
                                    else
                                    {
                                        this.m_inRecursiveRowHierarchy = false;
                                    }
                                    grouping.RecursiveLevel = this.m_lastRecursiveLevel;
                                    grouping.SetGroupInstanceExpressionValues(dataRegionMemberInstance.GroupExprValues);
                                    if (mode == OnDemandMode.FullSetup && grouping != null && grouping.GroupExpressions != null && grouping.GroupExpressions.Count > 0)
                                    {
                                        AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo expressionInfo = grouping.GroupExpressions[0];
                                        if (expressionInfo.Type == AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Field)
                                        {
                                            AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet2 = memberDef.DataRegionDef.GetDataSet(reportDefinition);
                                            AspNetCore.ReportingServices.ReportIntermediateFormat.Field   field    = dataSet2.Fields[expressionInfo.IntValue];
                                            if (field.DataField != null)
                                            {
                                                string dataField = field.DataField;
                                                object second    = dataRegionMemberInstance.GroupExprValues[0];
                                                PairObj <string, object> pairObj = this.m_specialLastGroupingValues[j];
                                                if (pairObj == null)
                                                {
                                                    pairObj = new PairObj <string, object>(dataField, second);
                                                    this.m_specialLastGroupingValues[j] = pairObj;
                                                }
                                                else
                                                {
                                                    pairObj.First  = dataField;
                                                    pairObj.Second = second;
                                                }
                                            }
                                        }
                                    }
                                }
                                else
                                {
                                    num3 = j + 1;
                                }
                            }
                            break;

                        case InstancePathItemType.None:
                            break;
                        }
                    }
                    if (mode == OnDemandMode.FullSetup && !flag3 && scopeInstance != null && num3 > 0)
                    {
                        while (num3 < this.m_lastInstancePath.Count)
                        {
                            if (!this.m_lastInstancePath[num3].IsScope)
                            {
                                num3++;
                                continue;
                            }
                            scopeInstance.SetupFields(base.m_odpContext, base.m_odpContext.CurrentDataSetIndex);
                            break;
                        }
                    }
                    if (mode == OnDemandMode.FullSetup && !base.m_odpContext.IsTablixProcessingMode && base.m_odpContext.CurrentReportInstance != null && dataRegionInstance == null && reportDefinition.DataSetsNotOnlyUsedInParameters == 1)
                    {
                        AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet         firstDataSet     = reportDefinition.FirstDataSet;
                        AspNetCore.ReportingServices.ReportIntermediateFormat.DataSetInstance dataSetInstance2 = base.m_odpContext.CurrentReportInstance.GetDataSetInstance(firstDataSet, base.m_odpContext);
                        if (dataSetInstance2 != null)
                        {
                            bool flag5 = true;
                            if (!base.m_odpContext.IsTablixProcessingComplete(firstDataSet.IndexInCollection))
                            {
                                this.PerformOnDemandTablixProcessing(firstDataSet);
                                flag5 = false;
                            }
                            if (base.m_odpContext.CurrentOdpDataSetInstance == dataSetInstance2)
                            {
                                flag5 = false;
                            }
                            if (flag5)
                            {
                                dataSetInstance2.SetupEnvironment(base.m_odpContext, true);
                            }
                            else if (!dataSetInstance2.NoRows)
                            {
                                dataSetInstance2.SetupFields(base.m_odpContext, dataSetInstance2);
                            }
                        }
                    }
                }
            }
            finally
            {
                if (needDeepCopyPath)
                {
                    InstancePathItem.DeepCopyPath(list, ref this.m_lastInstancePath);
                }
            }
        }
Example #19
0
        public override void CreateCell(RuntimeCells cellsCollection, int collectionKey, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode outerGroupingMember, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode innerGroupingMember, AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef)
        {
            RuntimeCell runtimeCell = new RuntimeChartCriCell((RuntimeChartCriGroupLeafObjReference)base.m_selfReference, outerGroupingMember, innerGroupingMember, !base.m_hasInnerHierarchy);

            if ((BaseReference)runtimeCell.SelfReference == (object)null)
            {
                cellsCollection.AddCell(collectionKey, runtimeCell);
            }
            else
            {
                IReference <RuntimeCell> selfReference = runtimeCell.SelfReference;
                selfReference.UnPinValue();
                cellsCollection.AddCell(collectionKey, selfReference);
            }
        }
 public RuntimeCellWithContents(RuntimeDataTablixGroupLeafObjReference owner, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode outerGroupingMember, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode innerGroupingMember, bool innermost)
     : base(owner, outerGroupingMember, innerGroupingMember, innermost)
 {
 }
        private void CreateTopLevelRuntimeGroupings(ref DataActions groupingDataAction, ref IReference <RuntimeMemberObj>[] groupings, HierarchyNodeList topLevelStaticMembers, HierarchyNodeList topLevelDynamicMembers, IReference <RuntimeMemberObj>[] innerGroupings, bool hasOppositeStaticLeafMembers)
        {
            int num = (topLevelDynamicMembers != null) ? topLevelDynamicMembers.Count : 0;

            groupings = new IReference <RuntimeMemberObj> [Math.Max(1, num)];
            if (num == 0)
            {
                IReference <RuntimeMemberObj> reference = RuntimeDataTablixMemberObj.CreateRuntimeMemberObject((IReference <IScope>)base.m_selfReference, (AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode)null, ref groupingDataAction, base.m_odpContext, innerGroupings, topLevelStaticMembers, hasOppositeStaticLeafMembers, 0, base.ObjectType);
                groupings[0] = reference;
            }
            else
            {
                for (int i = 0; i < num; i++)
                {
                    AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode dynamicMemberDef = topLevelDynamicMembers[i];
                    IReference <RuntimeMemberObj> reference2 = RuntimeDataTablixMemberObj.CreateRuntimeMemberObject((IReference <IScope>)base.m_selfReference, dynamicMemberDef, ref groupingDataAction, base.m_odpContext, innerGroupings, (i == 0) ? topLevelStaticMembers : null, hasOppositeStaticLeafMembers, 0, base.ObjectType);
                    groupings[i] = reference2;
                }
            }
        }
Example #22
0
        public static IReference <RuntimeMemberObj> CreateRuntimeMemberObject(IReference <IScope> owner, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode dynamicMemberDef, ref DataActions dataAction, OnDemandProcessingContext odpContext, IReference <RuntimeMemberObj>[] innerGroupings, HierarchyNodeList staticMembers, bool outerMostStatics, int headingLevel, AspNetCore.ReportingServices.ReportProcessing.ObjectType dataRegionType)
        {
            RuntimeDataTablixMemberObj obj = new RuntimeDataTablixMemberObj(owner, dynamicMemberDef, ref dataAction, odpContext, innerGroupings, staticMembers, outerMostStatics, headingLevel, dataRegionType);

            return(odpContext.TablixProcessingScalabilityCache.Allocate((RuntimeMemberObj)obj, headingLevel));
        }
        public string GetNewScopeNameForInnerOrOuterAggregate(AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo originalAggregate)
        {
            string        scope         = originalAggregate.PublishingInfo.Scope;
            IRIFDataScope iRIFDataScope = default(IRIFDataScope);

            if (this.m_scopeNamesToClone.TryGetValue(scope, out iRIFDataScope))
            {
                AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegion = iRIFDataScope as AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion;
                if (dataRegion != null)
                {
                    return(this.CreateUniqueReportItemName(scope, dataRegion.IsClone));
                }
                AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode reportHierarchyNode = iRIFDataScope as AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode;
                if (reportHierarchyNode != null)
                {
                    return(this.CreateAndRegisterUniqueGroupName(scope, reportHierarchyNode.IsClone));
                }
                Global.Tracer.Assert(false, "Unknown object type in GetNewScopeNameForNestedAggregate: {0}", iRIFDataScope);
                return(scope);
            }
            IRIFDataScope scopeByName = this.m_scopeTree.GetScopeByName(this.m_currentScope);
            int           num         = (scopeByName == null || !this.NeedsSubtotalScopeLift(originalAggregate, scopeByName)) ? (-1) : this.m_scopeTree.MeasureScopeDistance(this.m_currentScopeBeingCloned, this.m_currentScope);

            if (num <= 0)
            {
                return(scope);
            }
            string text = this.m_scopeTree.FindAncestorScopeName(scope, num);

            if (text == null)
            {
                return(scope);
            }
            if (this.m_outerAggregate != null && !string.IsNullOrEmpty(this.m_outerAggregate.PublishingInfo.Scope))
            {
                IRIFDataScope scopeByName2 = this.m_scopeTree.GetScopeByName(this.m_outerAggregate.PublishingInfo.Scope);
                IRIFDataScope scopeByName3 = this.m_scopeTree.GetScopeByName(text);
                if (scopeByName2 != null && scopeByName3 != null && this.m_scopeTree.IsParentScope(scopeByName3, scopeByName2))
                {
                    text = this.m_outerAggregate.PublishingInfo.Scope;
                }
            }
            return(text);
        }
        private void BindScopeToInstance(IRIFReportDataScope reportDataScope)
        {
            if (!reportDataScope.IsBoundToStreamingScopeInstance)
            {
                if (!reportDataScope.IsScope)
                {
                    IRIFReportDataScope parentReportScope = reportDataScope.ParentReportScope;
                    this.EnsureScopeIsBound(parentReportScope);
                    reportDataScope.BindToStreamingScopeInstance(parentReportScope.CurrentStreamingScopeInstance);
                }
                else
                {
                    switch (reportDataScope.InstancePathItem.Type)
                    {
                    case InstancePathItemType.Cell:
                        if (reportDataScope.IsDataIntersectionScope)
                        {
                            IRIFReportIntersectionScope          iRIFReportIntersectionScope = (IRIFReportIntersectionScope)reportDataScope;
                            IRIFReportDataScope                  parentRowReportScope        = iRIFReportIntersectionScope.ParentRowReportScope;
                            IReference <IOnDemandMemberInstance> reference3 = default(IReference <IOnDemandMemberInstance>);
                            if (this.TryBindParentScope <IOnDemandMemberInstance>(reportDataScope, parentRowReportScope, out reference3))
                            {
                                IRIFReportDataScope parentColumnReportScope     = iRIFReportIntersectionScope.ParentColumnReportScope;
                                IReference <IOnDemandMemberInstance> reference4 = default(IReference <IOnDemandMemberInstance>);
                                if (this.TryBindParentScope <IOnDemandMemberInstance>(reportDataScope, parentColumnReportScope, out reference4))
                                {
                                    IReference <IOnDemandMemberInstance> reference5;
                                    IReference <IOnDemandMemberInstance> reference6;
                                    if (!iRIFReportIntersectionScope.IsColumnOuterGrouping)
                                    {
                                        reference5 = reference3;
                                        reference6 = reference4;
                                    }
                                    else
                                    {
                                        reference5 = reference4;
                                        reference6 = reference3;
                                    }
                                    this.CheckForPrematureScopeInstance(reportDataScope);
                                    IReference <IOnDemandScopeInstance> reference7 = default(IReference <IOnDemandScopeInstance>);
                                    IOnDemandScopeInstance cellInstance            = SyntheticTriangulatedCellReference.GetCellInstance(reference5, reference6, out reference7);
                                    if (cellInstance == null && iRIFReportIntersectionScope.DataScopeInfo.NeedsIDC && this.TryProcessToCreateCell(iRIFReportIntersectionScope, (RuntimeDataTablixGroupLeafObjReference)reference6, (RuntimeDataTablixGroupLeafObjReference)reference5))
                                    {
                                        cellInstance = SyntheticTriangulatedCellReference.GetCellInstance(reference5, reference6, out reference7);
                                    }
                                    if (cellInstance != null)
                                    {
                                        if (reference7 == null)
                                        {
                                            iRIFReportIntersectionScope.BindToStreamingScopeInstance(reference5, reference6);
                                            this.SetupEnvironment(reportDataScope, cellInstance, iRIFReportIntersectionScope.CurrentStreamingScopeInstance);
                                        }
                                        else
                                        {
                                            reportDataScope.BindToStreamingScopeInstance(reference7);
                                        }
                                    }
                                }
                            }
                        }
                        else
                        {
                            Global.Tracer.Assert(false, "Non-intersection cell scopes are not yet supported by streaming ODP.");
                        }
                        break;

                    case InstancePathItemType.ColumnMemberInstanceIndexTopMost:
                    case InstancePathItemType.ColumnMemberInstanceIndex:
                    case InstancePathItemType.RowMemberInstanceIndex:
                    {
                        IRIFReportDataScope parentReportScope3 = reportDataScope.ParentReportScope;
                        IReference <IOnDemandMemberOwnerInstance> reference2 = default(IReference <IOnDemandMemberOwnerInstance>);
                        if (this.TryBindParentScope <IOnDemandMemberOwnerInstance>(reportDataScope, parentReportScope3, out reference2))
                        {
                            this.CheckForPrematureScopeInstance(reportDataScope);
                            using (reference2.PinValue())
                            {
                                IOnDemandMemberOwnerInstance onDemandMemberOwnerInstance = reference2.Value();
                                AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode rifMember = (AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode)reportDataScope;
                                IOnDemandMemberInstanceReference firstMemberInstance = onDemandMemberOwnerInstance.GetFirstMemberInstance(rifMember);
                                if (this.RequiresIdcProcessing(reportDataScope, firstMemberInstance, (IReference <IOnDemandScopeInstance>)reference2))
                                {
                                    firstMemberInstance = onDemandMemberOwnerInstance.GetFirstMemberInstance(rifMember);
                                }
                                reportDataScope.BindToStreamingScopeInstance(firstMemberInstance);
                            }
                        }
                        break;
                    }

                    case InstancePathItemType.DataRegion:
                    {
                        IRIFReportDataScope parentReportScope2 = reportDataScope.ParentReportScope;
                        AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegion = (AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion)reportDataScope;
                        IReference <IOnDemandScopeInstance> reference = default(IReference <IOnDemandScopeInstance>);
                        if (parentReportScope2 == null)
                        {
                            AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet = dataRegion.DataScopeInfo.DataSet;
                            DataPipelineManager orCreatePipelineManager = this.GetOrCreatePipelineManager(dataSet, dataRegion);
                            reportDataScope.BindToStreamingScopeInstance(orCreatePipelineManager.GroupTreeRoot.GetDataRegionInstance(dataRegion));
                        }
                        else if (this.TryBindParentScope <IOnDemandScopeInstance>(reportDataScope, parentReportScope2, out reference))
                        {
                            this.CheckForPrematureScopeInstance(reportDataScope);
                            using (reference.PinValue())
                            {
                                IOnDemandScopeInstance onDemandScopeInstance           = reference.Value();
                                IReference <IOnDemandScopeInstance> dataRegionInstance = onDemandScopeInstance.GetDataRegionInstance(dataRegion);
                                if (this.RequiresIdcProcessing(reportDataScope, dataRegionInstance, reference))
                                {
                                    dataRegionInstance = onDemandScopeInstance.GetDataRegionInstance(dataRegion);
                                }
                                reportDataScope.BindToStreamingScopeInstance(dataRegionInstance);
                            }
                        }
                        break;
                    }

                    default:
                        Global.Tracer.Assert(false, "SetupObjectModels cannot handle IRIFReportDataScope of type: {0}", Enum.GetName(typeof(InstancePathItemType), reportDataScope.InstancePathItem.Type));
                        break;
                    }
                }
            }
        }
        public override void BindNextMemberInstance(IInstancePath rifObject, IReportScopeInstance romInstance, int moveNextInstanceIndex)
        {
            IRIFReportDataScope iRIFReportDataScope        = romInstance.ReportScope.RIFReportScope as IRIFReportDataScope;
            IReference <IOnDemandMemberInstance> reference = iRIFReportDataScope.CurrentStreamingScopeInstance as IReference <IOnDemandMemberInstance>;

            if (!reference.Value().IsNoRows)
            {
                IDisposable             disposable             = reference.PinValue();
                IOnDemandMemberInstance onDemandMemberInstance = reference.Value();
                iRIFReportDataScope.BindToStreamingScopeInstance(onDemandMemberInstance.GetNextMemberInstance());
                if (!iRIFReportDataScope.IsBoundToStreamingScopeInstance && OnDemandStateManagerStreaming.CanBindOrProcessIndividually(iRIFReportDataScope) && onDemandMemberInstance.IsMostRecentlyCreatedScopeInstance)
                {
                    IdcDataManager idcDataManager = null;
                    if (iRIFReportDataScope.DataScopeInfo.NeedsIDC)
                    {
                        idcDataManager = (IdcDataManager)base.GetIdcDataManager(iRIFReportDataScope);
                        List <object> groupExprValues = onDemandMemberInstance.GroupExprValues;
                        AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode   reportHierarchyNode = (AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode)iRIFReportDataScope;
                        List <AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo> groupExpressions    = reportHierarchyNode.Grouping.GroupExpressions;
                        idcDataManager.SetSkippingFilter(groupExpressions, groupExprValues);
                    }
                    if (this.TryProcessToNextScopeInstance(iRIFReportDataScope))
                    {
                        iRIFReportDataScope.BindToStreamingScopeInstance(onDemandMemberInstance.GetNextMemberInstance());
                    }
                    if (idcDataManager != null)
                    {
                        idcDataManager.ClearSkippingFilter();
                    }
                }
                if (!iRIFReportDataScope.IsBoundToStreamingScopeInstance)
                {
                    iRIFReportDataScope.BindToNoRowsScopeInstance(base.m_odpContext);
                }
                this.SetupEnvironment(iRIFReportDataScope, iRIFReportDataScope.CurrentStreamingScopeInstance.Value(), iRIFReportDataScope.CurrentStreamingScopeInstance);
                disposable.Dispose();
            }
        }
 public IReference <IDataCorrelation> GetIdcReceiver(IRIFReportDataScope scope)
 {
     if (scope.IsGroup)
     {
         AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode rifMember = scope as AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode;
         IReference <RuntimeMemberObj>[] memberCollection = this.GetMemberCollection(rifMember);
         return(RuntimeDataRegionObj.GetGroupRoot(rifMember, memberCollection));
     }
     AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion rifDataRegion = scope as AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion;
     return(this.GetNestedDataRegion(rifDataRegion));
 }
 protected abstract RuntimeCell CreateCell(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode outerGroupingMember, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode innerGroupingMember);
 public IOnDemandMemberInstanceReference GetFirstMemberInstance(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode rifMember)
 {
     IReference <RuntimeMemberObj>[] memberCollection = this.GetMemberCollection(rifMember);
     return(RuntimeDataRegionObj.GetFirstMemberInstance(rifMember, memberCollection));
 }
 protected abstract List <AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem> GetGroupScopedContents(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode member);
 public RuntimeChartCriCell(RuntimeChartCriGroupLeafObjReference owner, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode outerGroupingMember, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode innerGroupingMember, bool innermost)
     : base(owner, outerGroupingMember, innerGroupingMember, innermost)
 {
 }