public RuntimeDetailObj(RuntimeDetailObj detailRoot, AspNetCore.ReportingServices.ReportProcessing.ObjectType objectType)
     : base(detailRoot.OdpContext, objectType, detailRoot.Depth)
 {
     base.m_hierarchyRoot = (RuntimeDetailObjReference)detailRoot.SelfReference;
     this.m_outerScope    = detailRoot.m_outerScope;
     this.m_dataRegionDef = detailRoot.m_dataRegionDef;
 }
Ejemplo n.º 2
0
        public RuntimeCell GetOrCreateCell(AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef, IReference <RuntimeDataTablixGroupLeafObj> ownerRef, IReference <RuntimeDataTablixGroupRootObj> currOuterGroupRootRef, out IDisposable cleanupRef)
        {
            RuntimeDataTablixGroupRootObj runtimeDataTablixGroupRootObj = currOuterGroupRootRef.Value();
            int groupLeafIndex = dataRegionDef.OuterGroupingIndexes[runtimeDataTablixGroupRootObj.HierarchyDef.HierarchyDynamicIndex];

            return(this.GetOrCreateCellByIndex(groupLeafIndex, dataRegionDef, ownerRef, runtimeDataTablixGroupRootObj, out cleanupRef));
        }
Ejemplo n.º 3
0
 public void UnRegisterDataRegion(AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegion)
 {
     this.m_activeScopes       = this.m_activeScopes.Rest;
     this.m_activeRowScopes    = this.m_activeRowScopes.Rest;
     this.m_activeColumnScopes = this.m_activeColumnScopes.Rest;
     this.m_dataRegionScopes   = this.m_dataRegionScopes.Rest;
 }
 public IOnDemandMemberOwnerInstanceReference GetDataRegionInstance(AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion rifDataRegion)
 {
     if (this.m_runtimeDataRegions == null)
     {
         return(null);
     }
     return(this.m_runtimeDataRegions.GetDataRegionObj(rifDataRegion));
 }
 protected RuntimeDetailObj(IReference <IScope> outerScope, AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef, DataActions dataAction, OnDemandProcessingContext odpContext, AspNetCore.ReportingServices.ReportProcessing.ObjectType objectType)
     : base(odpContext, objectType, (outerScope == null) ? dataRegionDef.InnerGroupingDynamicMemberCount : (outerScope.Value().Depth + 1))
 {
     base.m_hierarchyRoot   = (RuntimeDetailObjReference)base.SelfReference;
     this.m_outerScope      = outerScope;
     this.m_dataRegionDef   = dataRegionDef;
     this.m_outerDataAction = dataAction;
 }
        private void AddDataRegion(RuntimeDataTablixObj dataRegion, AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef)
        {
            RuntimeDataTablixObjReference runtimeDataTablixObjReference = (RuntimeDataTablixObjReference)dataRegion.SelfReference;

            runtimeDataTablixObjReference.UnPinValue();
            int indexInCollection = dataRegionDef.IndexInCollection;

            ListUtils.AdjustLength(this.m_dataRegionObjs, indexInCollection);
            this.m_dataRegionObjs[indexInCollection] = runtimeDataTablixObjReference;
        }
 protected bool DataRegionInScope(AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef, string scope)
 {
     if (dataRegionDef.ScopeNames == null)
     {
         bool result = default(bool);
         dataRegionDef.ScopeNames = this.GetScopeNames(this.SelfReference, scope, out result);
         return(result);
     }
     return(dataRegionDef.ScopeNames.Contains(scope));
 }
 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));
 }
Ejemplo n.º 9
0
 public override void CreateInstances(IReference <RuntimeDataRegionObj> containingScopeRef, OnDemandProcessingContext odpContext, DataRegionInstance dataRegionInstance, bool isOuterGrouping, IReference <RuntimeDataTablixGroupRootObj> currOuterGroupRoot, ScopeInstance parentInstance, IReference <RuntimeMemberObj>[] innerMembers, IReference <RuntimeDataTablixGroupLeafObj> innerGroupLeaf)
 {
     AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef = dataRegionInstance.DataRegionDef;
     if (isOuterGrouping && this.m_hasStaticMembers)
     {
         dataRegionDef.NewOuterCells();
     }
     if ((BaseReference)null != (object)base.m_groupRoot)
     {
         dataRegionDef.CurrentOuterGroupRoot = currOuterGroupRoot;
         using (base.m_groupRoot.PinValue())
         {
             base.m_groupRoot.Value().CreateInstances(parentInstance, innerMembers, innerGroupLeaf);
         }
         if (this.m_staticLeafCellIndexes != null)
         {
             if (isOuterGrouping && this.m_hasStaticMembers)
             {
                 dataRegionDef.NewOuterCells();
             }
             IReference <RuntimeDataTablixGroupRootObj> reference = null;
             if (base.m_owner is IReference <RuntimeDataTablixObj> )
             {
                 using (base.m_owner.PinValue())
                 {
                     ((RuntimeDataTablixObj)base.m_owner.Value()).SetupEnvironment();
                 }
                 if (isOuterGrouping && this.m_hasStaticMembers)
                 {
                     reference = dataRegionDef.CurrentOuterGroupRoot;
                     dataRegionDef.CurrentOuterGroupRoot = null;
                     currOuterGroupRoot = null;
                 }
             }
             else
             {
                 using (containingScopeRef.PinValue())
                 {
                     containingScopeRef.Value().SetupEnvironment();
                 }
             }
             this.CreateCells(containingScopeRef, odpContext, dataRegionInstance, isOuterGrouping, currOuterGroupRoot, parentInstance, innerMembers, innerGroupLeaf);
             if (reference != null)
             {
                 dataRegionDef.CurrentOuterGroupRoot = reference;
             }
         }
     }
     else
     {
         this.CreateCells(containingScopeRef, odpContext, dataRegionInstance, isOuterGrouping, currOuterGroupRoot, parentInstance, innerMembers, innerGroupLeaf);
     }
 }
Ejemplo n.º 10
0
        public void RegisterDataRegion(AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegion)
        {
            ScopeTreeNode scopeTreeNode = default(ScopeTreeNode);

            if (!this.m_scopes.TryGetValue((IRIFDataScope)dataRegion, out scopeTreeNode))
            {
                scopeTreeNode = new SubScopeNode(dataRegion, this.m_activeScopes.First);
            }
            this.AddScope(scopeTreeNode);
            this.m_dataRegionScopes   = this.m_dataRegionScopes.Add(scopeTreeNode);
            this.m_activeRowScopes    = this.m_activeRowScopes.Add(null);
            this.m_activeColumnScopes = this.m_activeColumnScopes.Add(null);
        }
Ejemplo n.º 11
0
 public override void SetNewContext()
 {
     base.SetNewContext();
     if (this.m_pageBreak != null)
     {
         this.m_pageBreak.SetNewContext();
     }
     if (!base.m_isOldSnapshot)
     {
         AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegion = (AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion)base.ReportItemDef;
         dataRegion.ClearStreamingScopeInstanceBinding();
     }
 }
        public override void Deserialize(IntermediateFormatReader reader)
        {
            base.Deserialize(reader);
            reader.RegisterDeclaration(RuntimeDetailObj.m_declaration);
            IScalabilityCache scalabilityCache = reader.PersistenceHelper as IScalabilityCache;

            while (reader.NextMember())
            {
                switch (reader.CurrentMember.MemberName)
                {
                case MemberName.OuterScope:
                    this.m_outerScope = (IReference <IScope>)reader.ReadRIFObject();
                    break;

                case MemberName.DataRegionDef:
                {
                    int id = reader.ReadInt32();
                    this.m_dataRegionDef = (AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion)scalabilityCache.FetchStaticReference(id);
                    break;
                }

                case MemberName.DataRows:
                    this.m_dataRows = reader.ReadRIFObject <ScalableList <DataFieldRow> >();
                    break;

                case MemberName.RunningValueValues:
                    this.m_rvValueList = reader.ReadListOfRIFObjectArrays <AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult>();
                    break;

                case MemberName.RunningValuesInGroup:
                    this.m_runningValuesInGroup = reader.ReadListOfPrimitives <string>();
                    break;

                case MemberName.PreviousValuesInGroup:
                    this.m_previousValuesInGroup = reader.ReadListOfPrimitives <string>();
                    break;

                case MemberName.GroupCollection:
                    this.m_groupCollection = reader.ReadStringRIFObjectDictionary <IReference <RuntimeGroupRootObj> >();
                    break;

                case MemberName.OuterDataAction:
                    this.m_outerDataAction = (DataActions)reader.ReadEnum();
                    break;

                default:
                    Global.Tracer.Assert(false);
                    break;
                }
            }
        }
Ejemplo n.º 13
0
        public void CalculateRunningValues(AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef, Dictionary <string, IReference <RuntimeGroupRootObj> > groupCol, IReference <RuntimeGroupRootObj> lastGroup, IReference <RuntimeDataTablixGroupLeafObj> owner, AggregateUpdateContext aggContext)
        {
            IDisposable disposable   = default(IDisposable);
            RuntimeCell orCreateCell = this.GetOrCreateCell(dataRegionDef, owner, dataRegionDef.CurrentOuterGroupRoot, out disposable);

            if (orCreateCell != null)
            {
                orCreateCell.CalculateRunningValues(groupCol, lastGroup, aggContext);
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
        }
 protected void DataRegionGetGroupNameValuePairs(AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef, Dictionary <string, object> nameValuePairs)
 {
     if (dataRegionDef.ScopeNames == null)
     {
         dataRegionDef.ScopeNames = this.GetScopeNames(this.SelfReference, nameValuePairs);
     }
     else
     {
         IEnumerator enumerator = dataRegionDef.ScopeNames.Values.GetEnumerator();
         while (enumerator.MoveNext())
         {
             RuntimeDataRegionObj.AddGroupNameValuePair(this.m_odpContext, enumerator.Current as AspNetCore.ReportingServices.ReportIntermediateFormat.Grouping, nameValuePairs);
         }
     }
 }
        public RuntimeDataTablixObj(IReference <IScope> outerScope, AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataTablixDef, ref DataActions dataAction, OnDemandProcessingContext odpContext, bool onePassProcess, AspNetCore.ReportingServices.ReportProcessing.ObjectType objectType)
            : base(outerScope, dataTablixDef, ref dataAction, odpContext, onePassProcess, dataTablixDef.RunningValues, objectType, outerScope.Value().Depth + 1)
        {
            bool        handleMyDataAction = default(bool);
            DataActions innerDataAction    = default(DataActions);

            this.ConstructorHelper(ref dataAction, onePassProcess, out handleMyDataAction, out innerDataAction);
            base.m_innerDataAction = innerDataAction;
            DataActions userSortDataAction = base.HandleSortFilterEvent();

            this.ConstructRuntimeStructure(ref innerDataAction, onePassProcess);
            this.HandleDataAction(handleMyDataAction, innerDataAction, userSortDataAction);
            base.m_odpContext.CreatedScopeInstance(base.m_dataRegionDef);
            this.m_scopeInstanceNumber = RuntimeDataRegionObj.AssignScopeInstanceNumber(base.m_dataRegionDef.DataScopeInfo);
        }
Ejemplo n.º 16
0
        public AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion GetParentDataRegion(IRIFDataScope scope)
        {
            AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion parentDataRegion = null;
            DirectedScopeTreeVisitor visitor = delegate(IRIFDataScope candidate)
            {
                if (candidate != scope)
                {
                    parentDataRegion = (candidate as AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion);
                }
                return(parentDataRegion == null);
            };

            this.Traverse(visitor, scope);
            return(parentDataRegion);
        }
Ejemplo n.º 17
0
 public int[] GetRepeatSiblings()
 {
     if (base.m_isOldSnapshot)
     {
         return(((AspNetCore.ReportingServices.ReportRendering.DataRegion)base.m_renderReportItem).GetRepeatSiblings());
     }
     AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegion = (AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion)base.ReportItemDef;
     if (dataRegion.RepeatSiblings == null)
     {
         return(new int[0]);
     }
     int[] array = new int[dataRegion.RepeatSiblings.Count];
     dataRegion.RepeatSiblings.CopyTo(array);
     return(array);
 }
 public AutomaticSubtotalContext(AspNetCore.ReportingServices.ReportIntermediateFormat.Report report, List <ICreateSubtotals> createSubtotals, List <AspNetCore.ReportingServices.ReportIntermediateFormat.Grouping> domainScopeGroups, NameValidator reportItemNameValidator, NameValidator scopeNameValidator, NameValidator variableNameValidator, Dictionary <string, AspNetCore.ReportingServices.ReportIntermediateFormat.ISortFilterScope> reportScopes, List <AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItemCollection> reportItemCollections, List <AspNetCore.ReportingServices.ReportIntermediateFormat.IAggregateHolder> aggregateHolders, List <AspNetCore.ReportingServices.ReportIntermediateFormat.IRunningValueHolder> runningValueHolders, Holder <int> variableSequenceIdCounter, Holder <int> textboxSequenceIdCounter, ScopeTree scopeTree)
 {
     this.m_createSubtotals         = createSubtotals;
     this.m_domainScopeGroups       = domainScopeGroups;
     this.m_reportItemNameValidator = reportItemNameValidator;
     this.m_scopeNameValidator      = scopeNameValidator;
     this.m_variableNameValidator   = variableNameValidator;
     this.m_report = report;
     this.m_variableSequenceIdCounter        = variableSequenceIdCounter;
     this.m_textboxSequenceIdCounter         = textboxSequenceIdCounter;
     this.m_dynamicWithStaticPeerEncountered = false;
     this.m_location          = LocationFlags.None;
     this.m_objectName        = null;
     this.m_objectType        = ObjectType.Tablix;
     this.m_currentDataRegion = null;
     this.m_cellLists         = null;
     this.m_tablixColumns     = null;
     this.m_rows                                = null;
     this.m_scopeNameMap                        = new Dictionary <string, string>(StringComparer.Ordinal);
     this.m_reportItemNameMap                   = new Dictionary <string, string>(StringComparer.Ordinal);
     this.m_aggregateMap                        = new Dictionary <string, string>(StringComparer.Ordinal);
     this.m_lookupMap                           = new Dictionary <string, string>(StringComparer.Ordinal);
     this.m_variableNameMap                     = new Dictionary <string, string>(StringComparer.Ordinal);
     this.m_currentScope                        = null;
     this.m_currentScopeBeingCloned             = null;
     this.m_startIndex                          = new Holder <int>();
     this.m_currentIndex                        = new Holder <int>();
     this.m_headerLevel                         = 0;
     this.m_originalColumnCount                 = 0;
     this.m_originalRowCount                    = 0;
     this.m_reportScopes                        = reportScopes;
     this.m_reportItemCollections               = reportItemCollections;
     this.m_aggregateHolders                    = aggregateHolders;
     this.m_runningValueHolders                 = runningValueHolders;
     this.m_expressionsWithReportItemReferences = new List <AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo>();
     this.m_visibilitiesWithToggleToUpdate      = new List <AspNetCore.ReportingServices.ReportIntermediateFormat.Visibility>();
     this.m_reportItemsWithRepeatWithToUpdate   = new List <AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem>();
     this.m_endUserSortWithTarget               = new List <AspNetCore.ReportingServices.ReportIntermediateFormat.EndUserSort>();
     this.m_scopeNamesToClone                   = new Dictionary <string, IRIFDataScope>(StringComparer.Ordinal);
     this.m_headerLevelHasStaticArray           = null;
     this.m_currentDataRegionClone              = null;
     this.m_currentMapClone                     = null;
     this.m_outerAggregate                      = null;
     this.m_scopeTree                           = scopeTree;
     this.m_currentDataScope                    = null;
     this.m_currentMapVectorLayerClone          = null;
 }
 private static void CreateDataRegionInstance(ScopeInstance parentInstance, OnDemandProcessingContext odpContext, RuntimeDataRegionObjReference dataRegionObjRef)
 {
     if (!((BaseReference)dataRegionObjRef == (object)null))
     {
         using (dataRegionObjRef.PinValue())
         {
             RuntimeDataTablixObj runtimeDataTablixObj = (RuntimeDataTablixObj)dataRegionObjRef.Value();
             AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef = runtimeDataTablixObj.DataRegionDef;
             runtimeDataTablixObj.SetupEnvironment();
             IReference <DataRegionInstance> reference = DataRegionInstance.CreateInstance(parentInstance, odpContext.OdpMetadata, dataRegionDef, odpContext.CurrentDataSetIndex);
             DataRegionInstance dataRegionInstance     = reference.Value();
             runtimeDataTablixObj.CreateInstances(dataRegionInstance);
             dataRegionInstance.InstanceComplete();
             dataRegionDef.RuntimeDataRegionObj = null;
         }
     }
 }
Ejemplo n.º 20
0
        private RuntimeCell GetOrCreateCellByIndex(int groupLeafIndex, AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef, IReference <RuntimeDataTablixGroupLeafObj> ownerRef, RuntimeDataTablixGroupRootObj currOuterGroupRoot, out IDisposable cleanupRef)
        {
            RuntimeCell andPinCell = this.GetAndPinCell(groupLeafIndex, out cleanupRef);

            if (andPinCell == null)
            {
                using (ownerRef.PinValue())
                {
                    RuntimeDataTablixGroupLeafObj runtimeDataTablixGroupLeafObj = ownerRef.Value();
                    if (!RuntimeCell.HasOnlySimpleGroupTreeCells(currOuterGroupRoot.HierarchyDef, runtimeDataTablixGroupLeafObj.MemberDef, dataRegionDef))
                    {
                        runtimeDataTablixGroupLeafObj.CreateCell(this, groupLeafIndex, currOuterGroupRoot.HierarchyDef, runtimeDataTablixGroupLeafObj.MemberDef, dataRegionDef);
                    }
                }
                andPinCell = this.GetAndPinCell(groupLeafIndex, out cleanupRef);
            }
            return(andPinCell);
        }
        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);
        }
 protected int DataRegionRecursiveLevel(AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef, string scope)
 {
     if (scope == null)
     {
         return(-1);
     }
     if (dataRegionDef.ScopeNames == null)
     {
         int result = default(int);
         dataRegionDef.ScopeNames = this.GetScopeNames(this.SelfReference, scope, out result);
         return(result);
     }
     AspNetCore.ReportingServices.ReportIntermediateFormat.Grouping grouping = dataRegionDef.ScopeNames[scope] as AspNetCore.ReportingServices.ReportIntermediateFormat.Grouping;
     if (grouping != null)
     {
         return(grouping.RecursiveLevel);
     }
     return(-1);
 }
 protected void DetailHandleSortFilterEvent(AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef, IReference <IScope> outerScope, bool isColumnAxis, int rowIndex)
 {
     using (outerScope.PinValue())
     {
         IScope scope = outerScope.Value();
         List <IReference <RuntimeSortFilterEventInfo> > runtimeSortFilterInfo = this.m_odpContext.RuntimeSortFilterInfo;
         if (runtimeSortFilterInfo != null && dataRegionDef.SortFilterSourceDetailScopeInfo != null && !scope.TargetForNonDetailSort)
         {
             int count = runtimeSortFilterInfo.Count;
             for (int i = 0; i < count; i++)
             {
                 IReference <RuntimeSortFilterEventInfo> reference = runtimeSortFilterInfo[i];
                 using (reference.PinValue())
                 {
                     RuntimeSortFilterEventInfo runtimeSortFilterEventInfo = reference.Value();
                     if (runtimeSortFilterEventInfo.EventSource.ContainingScopes != null && 0 < runtimeSortFilterEventInfo.EventSource.ContainingScopes.Count && -1 != dataRegionDef.SortFilterSourceDetailScopeInfo[i] && scope.TargetScopeMatched(i, false) && this.m_odpContext.ReportObjectModel.FieldsImpl.GetRowIndex() == dataRegionDef.SortFilterSourceDetailScopeInfo[i])
                     {
                         if (runtimeSortFilterEventInfo.EventSource.ContainingScopes.LastEntry == null)
                         {
                             AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem parent = runtimeSortFilterEventInfo.EventSource.Parent;
                             if (runtimeSortFilterEventInfo.EventSource.IsSubReportTopLevelScope)
                             {
                                 while (parent != null && !(parent is AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport))
                                 {
                                     parent = parent.Parent;
                                 }
                                 Global.Tracer.Assert(parent is AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport, "(parent is SubReport)");
                                 parent = parent.Parent;
                             }
                             if (parent == dataRegionDef)
                             {
                                 runtimeSortFilterEventInfo.SetEventSourceScope(isColumnAxis, this.SelfReference, rowIndex);
                             }
                         }
                         runtimeSortFilterEventInfo.AddDetailScopeInfo(isColumnAxis, this.SelfReference, rowIndex);
                     }
                 }
             }
         }
     }
 }
Ejemplo n.º 24
0
 public RuntimeRDLDataRegionObj(IReference <IScope> outerScope, AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef, ref DataActions dataAction, OnDemandProcessingContext odpContext, bool onePassProcess, List <AspNetCore.ReportingServices.ReportIntermediateFormat.RunningValueInfo> runningValues, AspNetCore.ReportingServices.ReportProcessing.ObjectType objectType, int level)
     : base(odpContext, objectType, level)
 {
     this.m_dataRegionDef = dataRegionDef;
     this.m_outerScope    = outerScope;
     RuntimeDataRegionObj.CreateAggregates(base.m_odpContext, dataRegionDef.Aggregates, ref this.m_nonCustomAggregates, ref this.m_customAggregates);
     if (dataRegionDef.DataScopeInfo != null)
     {
         RuntimeDataRegionObj.CreateAggregates <AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo>(base.m_odpContext, (BucketedAggregatesCollection <AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo>)dataRegionDef.DataScopeInfo.AggregatesOfAggregates, ref this.m_aggregatesOfAggregates);
     }
     if (dataRegionDef.Filters != null)
     {
         this.m_filters = new Filters(Filters.FilterTypes.DataRegionFilter, (IReference <AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.IFilterOwner>)base.SelfReference, dataRegionDef.Filters, dataRegionDef.ObjectType, dataRegionDef.Name, base.m_odpContext, level + 1);
     }
     else
     {
         this.m_outerDataAction = dataAction;
         this.m_dataAction      = dataAction;
         dataAction             = DataActions.None;
     }
 }
 protected bool DetailTargetScopeMatched(AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef, IReference <IScope> outerScope, bool isColumnAxis, int index)
 {
     if (this.m_odpContext.RuntimeSortFilterInfo != null)
     {
         IReference <RuntimeSortFilterEventInfo> reference = this.m_odpContext.RuntimeSortFilterInfo[index];
         using (reference.PinValue())
         {
             RuntimeSortFilterEventInfo runtimeSortFilterEventInfo = reference.Value();
             if (runtimeSortFilterEventInfo != null)
             {
                 List <IReference <RuntimeDataRegionObj> > list = null;
                 List <int> list2 = null;
                 int        num   = -1;
                 if (isColumnAxis)
                 {
                     list  = runtimeSortFilterEventInfo.DetailColScopes;
                     list2 = runtimeSortFilterEventInfo.DetailColScopeIndices;
                     num   = dataRegionDef.CurrentColDetailIndex;
                 }
                 else
                 {
                     list  = runtimeSortFilterEventInfo.DetailRowScopes;
                     list2 = runtimeSortFilterEventInfo.DetailRowScopeIndices;
                     num   = dataRegionDef.CurrentRowDetailIndex;
                 }
                 if (list != null)
                 {
                     for (int i = 0; i < list.Count; i++)
                     {
                         if (this.SelfReference.Equals(list[i]) && num == list2[i])
                         {
                             return(true);
                         }
                     }
                 }
             }
         }
     }
     return(false);
 }
        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;
                    }
                    }
                }
            }
        }
Ejemplo n.º 27
0
 public override RuntimeDataTablixObjReference GetNestedDataRegion(AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion rifDataRegion)
 {
     Global.Tracer.Assert(this.m_dataRegionScopedItems != null, "Cannot find data region.");
     return(this.m_dataRegionScopedItems.GetDataRegionObj(rifDataRegion));
 }
        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);
                }
            }
        }
Ejemplo n.º 29
0
 public IOnDemandMemberOwnerInstanceReference GetDataRegionInstance(AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion rifDataRegion)
 {
     return(null);
 }
        public RuntimeDataTablixObjReference GetDataRegionObj(AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion rifDataRegion)
        {
            int indexInCollection = rifDataRegion.IndexInCollection;

            return(this.m_dataRegionObjs[indexInCollection]);
        }