private bool IsTargetScopeForDataProcessing(IRIFReportDataScope candidateScope)
 {
     return(this.m_targetScopeForDataProcessing.IsSameOrChildScopeOf(candidateScope));
 }
Exemple #2
0
 internal override bool ProcessOneRow(IRIFReportDataScope scope)
 {
     Global.Tracer.Assert(condition: false, "This method is not valid for this StateManager type.");
     throw new InvalidOperationException("This method is not valid for this StateManager type.");
 }
        private void RegisterParentForIdc(IRIFReportDataScope reportDataScope, IReference <IOnDemandScopeInstance> parentScopeInstanceRef)
        {
            IdcDataManager idcDataManager = (IdcDataManager)base.GetOrCreateIdcDataManager(reportDataScope);

            idcDataManager.RegisterActiveParent(parentScopeInstanceRef);
        }
 private bool TryProcessToNextScopeInstance(IRIFReportDataScope reportDataScope)
 {
     return(this.AdvanceDataPipeline(reportDataScope, PipelineAdvanceMode.ToStoppingScopeInstance));
 }
Exemple #5
0
        private static Relationship GetActiveRelationship(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet targetDataSet, IRIFReportDataScope sourceDataScope)
        {
            AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet = sourceDataScope.DataScopeInfo.DataSet;
            Relationship defaultRelationship = targetDataSet.GetDefaultRelationship(dataSet);

            Global.Tracer.Assert(defaultRelationship != null, "Could not find active relationship");
            return(defaultRelationship);
        }
Exemple #6
0
 public StreamingNoRowsMemberInstance(OnDemandProcessingContext odpContext, IRIFReportDataScope member)
     : base(odpContext, member)
 {
 }
Exemple #7
0
 private void CheckRelationshipDataSetBinding(ScopeTree scopeTree, ErrorContext errorContext, IRIFReportDataScope currentScope, IdcRelationship relationship, DataSet parentDataSetCandidate, ref bool dataSetAlreadyHasRelationship)
 {
     if (DataSet.AreEqualById(relationship.RelatedDataSet, parentDataSetCandidate))
     {
         if (dataSetAlreadyHasRelationship)
         {
             IRIFDataScope parentDataRegion = scopeTree.GetParentDataRegion(currentScope);
             IRIFDataScope parentRowScopeForIntersection    = scopeTree.GetParentRowScopeForIntersection(currentScope);
             IRIFDataScope parentColumnScopeForIntersection = scopeTree.GetParentColumnScopeForIntersection(currentScope);
             errorContext.Register(ProcessingErrorCode.rsInvalidRelationshipDuplicateParentScope, Severity.Error, currentScope.DataScopeObjectType, parentDataRegion.Name, "ParentScope", parentDataRegion.DataScopeObjectType.ToString(), parentRowScopeForIntersection.Name, parentColumnScopeForIntersection.Name);
         }
         dataSetAlreadyHasRelationship = true;
     }
 }
 public static bool TryGetInnermostParentScopeRelatedToTargetDataSet(DataSet targetDataSet, IRIFReportDataScope candidate, out IRIFReportDataScope targetScope)
 {
     while (candidate != null)
     {
         if (targetDataSet.HasDefaultRelationship(candidate.DataScopeInfo.DataSet))
         {
             targetScope = candidate;
             return(true);
         }
         if (candidate.IsDataIntersectionScope)
         {
             IRIFReportIntersectionScope iRIFReportIntersectionScope = (IRIFReportIntersectionScope)candidate;
             if (!DataScopeInfo.TryGetInnermostParentScopeRelatedToTargetDataSet(targetDataSet, iRIFReportIntersectionScope.ParentRowReportScope, out targetScope))
             {
                 return(DataScopeInfo.TryGetInnermostParentScopeRelatedToTargetDataSet(targetDataSet, iRIFReportIntersectionScope.ParentColumnReportScope, out targetScope));
             }
             return(true);
         }
         candidate = candidate.ParentReportScope;
     }
     targetScope = null;
     return(false);
 }
Exemple #9
0
        private bool HasRelationshipOrDefaultForDataSet(ScopeTree scopeTree, ErrorContext errorContext, IRIFReportDataScope currentScope, DataSet ourDataSet, DataSet parentDataSet, bool hasValidRelationship)
        {
            if (DataSet.AreEqualById(parentDataSet, ourDataSet))
            {
                return(true);
            }
            if (!hasValidRelationship && !ourDataSet.HasDefaultRelationship(parentDataSet))
            {
                IntersectJoinInfo.RegisterInvalidCellDataSetNameError(scopeTree, errorContext, currentScope, ourDataSet, parentDataSet);
                return(false);
            }
            Relationship activeRelationship = base.GetActiveRelationship(ourDataSet, parentDataSet);

            if (activeRelationship == null)
            {
                IntersectJoinInfo.RegisterInvalidCellDataSetNameError(scopeTree, errorContext, currentScope, ourDataSet, parentDataSet);
                return(false);
            }
            if (activeRelationship.IsCrossJoin)
            {
                DataRegion parentDataRegion = scopeTree.GetParentDataRegion(currentScope);
                errorContext.Register(ProcessingErrorCode.rsInvalidIntersectionNaturalCrossJoin, Severity.Error, currentScope.DataScopeObjectType, parentDataRegion.Name, "JoinConditions", parentDataRegion.ObjectType.ToString());
                return(false);
            }
            return(true);
        }
Exemple #10
0
        private static void RegisterInvalidCellDataSetNameError(ScopeTree scopeTree, ErrorContext errorContext, IRIFReportDataScope currentScope, DataSet ourDataSet, DataSet parentDataSet)
        {
            DataRegion parentDataRegion = scopeTree.GetParentDataRegion(currentScope);

            errorContext.Register(ProcessingErrorCode.rsInvalidCellDataSetName, Severity.Error, currentScope.DataScopeObjectType, parentDataRegion.Name, "DataSetName", parentDataSet.Name.MarkAsPrivate(), ourDataSet.Name.MarkAsPrivate(), parentDataRegion.ObjectType.ToString());
        }
 public override IReference <IDataCorrelation> GetIdcReceiver(IRIFReportDataScope scope)
 {
     AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegion = scope as AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion;
     Global.Tracer.Assert(dataRegion != null, "Invalid scope.");
     return(this.m_cellContents.GetDataRegionObj(dataRegion));
 }
Exemple #12
0
 public abstract bool ValidateRelationships(ScopeTree scopeTree, ErrorContext errorContext, DataSet ourDataSet, ParentDataSetContainer parentDataSets, IRIFReportDataScope currentScope);
Exemple #13
0
 public StreamingNoRowsCellInstance(OnDemandProcessingContext odpContext, IRIFReportDataScope cell)
     : base(odpContext, cell)
 {
 }
 internal abstract void CreatedScopeInstance(IRIFReportDataScope scope);
Exemple #15
0
 public override bool ValidateRelationships(ScopeTree scopeTree, ErrorContext errorContext, DataSet ourDataSet, ParentDataSetContainer parentDataSets, IRIFReportDataScope currentScope)
 {
     Global.Tracer.Assert(parentDataSets != null, "IntersectJoinInfo can only be used with one or two parent data sets");
     if (parentDataSets.Count == 1)
     {
         DataRegion parentDataRegion = scopeTree.GetParentDataRegion(currentScope);
         errorContext.Register(ProcessingErrorCode.rsUnexpectedCellDataSetName, Severity.Error, currentScope.DataScopeObjectType, parentDataRegion.Name, "DataSetName", parentDataRegion.ObjectType.ToString());
         return(false);
     }
     if (parentDataSets.AreAllSameDataSet() && DataSet.AreEqualById(parentDataSets.RowParentDataSet, ourDataSet))
     {
         return(false);
     }
     this.m_rowParentDataSet    = parentDataSets.RowParentDataSet;
     this.m_columnParentDataSet = parentDataSets.ColumnParentDataSet;
     if (this.m_rowParentDataSet != null && this.m_columnParentDataSet != null)
     {
         bool flag  = false;
         bool flag2 = false;
         if (base.m_relationships != null)
         {
             foreach (IdcRelationship relationship in base.m_relationships)
             {
                 if (!relationship.ValidateIntersectRelationship(errorContext, currentScope, scopeTree))
                 {
                     return(false);
                 }
                 this.CheckRelationshipDataSetBinding(scopeTree, errorContext, currentScope, relationship, this.m_rowParentDataSet, ref flag);
                 this.CheckRelationshipDataSetBinding(scopeTree, errorContext, currentScope, relationship, this.m_columnParentDataSet, ref flag2);
             }
         }
         flag  = this.HasRelationshipOrDefaultForDataSet(scopeTree, errorContext, currentScope, ourDataSet, this.m_rowParentDataSet, flag);
         flag2 = this.HasRelationshipOrDefaultForDataSet(scopeTree, errorContext, currentScope, ourDataSet, this.m_columnParentDataSet, flag2);
         if (flag && flag2)
         {
             DataRegion parentDataRegion2 = scopeTree.GetParentDataRegion(currentScope);
             if (this.ValidateCellBoundTotheSameDataSetAsParentScpoe(this.m_columnParentDataSet, this.m_rowParentDataSet, ourDataSet, parentDataRegion2.IsColumnGroupingSwitched))
             {
                 IRIFDataScope parentDataRegion3                = scopeTree.GetParentDataRegion(currentScope);
                 IRIFDataScope parentRowScopeForIntersection    = scopeTree.GetParentRowScopeForIntersection(currentScope);
                 IRIFDataScope parentColumnScopeForIntersection = scopeTree.GetParentColumnScopeForIntersection(currentScope);
                 if (parentDataRegion2.IsColumnGroupingSwitched)
                 {
                     errorContext.Register(ProcessingErrorCode.rsInvalidIntersectionNaturalJoin, Severity.Error, currentScope.DataScopeObjectType, parentDataRegion3.Name, "ParentScope", parentDataRegion3.DataScopeObjectType.ToString(), parentColumnScopeForIntersection.Name, parentRowScopeForIntersection.Name);
                     return(false);
                 }
                 errorContext.Register(ProcessingErrorCode.rsInvalidIntersectionNaturalJoin, Severity.Error, currentScope.DataScopeObjectType, parentDataRegion3.Name, "ParentScope", parentDataRegion3.DataScopeObjectType.ToString(), parentRowScopeForIntersection.Name, parentColumnScopeForIntersection.Name);
                 return(false);
             }
             return(true);
         }
         return(false);
     }
     return(false);
 }
        private static ParentDataSetContainer DetermineParentDataSets(ScopeTree scopeTree, IRIFReportDataScope scope)
        {
            if (scopeTree.IsIntersectionScope(scope))
            {
                IRIFDataScope parentRowScopeForIntersection    = scopeTree.GetParentRowScopeForIntersection(scope);
                IRIFDataScope parentColumnScopeForIntersection = scopeTree.GetParentColumnScopeForIntersection(scope);
                return(new ParentDataSetContainer(parentRowScopeForIntersection.DataScopeInfo.DataSet, parentColumnScopeForIntersection.DataScopeInfo.DataSet));
            }
            IRIFDataScope parentScope = scopeTree.GetParentScope(scope);
            DataSet       dataSet     = (parentScope != null) ? parentScope.DataScopeInfo.DataSet : scopeTree.GetDefaultTopLevelDataSet();

            if (dataSet == null)
            {
                return(null);
            }
            return(new ParentDataSetContainer(dataSet));
        }
Exemple #17
0
 public StreamingNoRowsDataRegionInstance(OnDemandProcessingContext odpContext, IRIFReportDataScope dataRegion)
     : base(odpContext, dataRegion)
 {
 }
Exemple #18
0
 public NonStructuralIdcDataManager(OnDemandProcessingContext odpContext, AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet targetDataSet, IRIFReportDataScope sourceDataScope)
     : base(odpContext, targetDataSet, NonStructuralIdcDataManager.GetActiveRelationship(targetDataSet, sourceDataScope))
 {
     this.m_sourceDataScope = sourceDataScope;
 }
Exemple #19
0
        internal override bool ValidateRelationships(ScopeTree scopeTree, ErrorContext errorContext, DataSet ourDataSet, ParentDataSetContainer parentDataSets, IRIFReportDataScope currentScope)
        {
            Global.Tracer.Assert(parentDataSets != null && parentDataSets.Count == 1, "LinearJoinInfo can only be used with exactly one parent data set");
            m_parentDataSet = parentDataSets.ParentDataSet;
            if (DataSet.AreEqualById(ourDataSet, m_parentDataSet))
            {
                return(false);
            }
            bool flag = false;

            if (m_relationships != null)
            {
                foreach (IdcRelationship relationship in m_relationships)
                {
                    flag |= relationship.ValidateLinearRelationship(errorContext, m_parentDataSet);
                }
            }
            if (flag || ourDataSet.HasDefaultRelationship(m_parentDataSet))
            {
                Relationship activeRelationship = GetActiveRelationship(ourDataSet);
                if (activeRelationship == null)
                {
                    RegisterInvalidInnerDataSetNameError(errorContext, ourDataSet, currentScope);
                    return(false);
                }
                if (activeRelationship.IsCrossJoin && (!activeRelationship.NaturalJoin || ScopeHasParentGroups(currentScope, scopeTree)))
                {
                    errorContext.Register(ProcessingErrorCode.rsInvalidNaturalCrossJoin, Severity.Error, currentScope.DataScopeObjectType, currentScope.Name, "JoinConditions");
                    return(false);
                }
                return(true);
            }
            RegisterInvalidInnerDataSetNameError(errorContext, ourDataSet, currentScope);
            return(false);
        }
 public IReference <IDataCorrelation> GetIdcReceiver(IRIFReportDataScope scope)
 {
     return(null);
 }
Exemple #21
0
        private void RegisterInvalidInnerDataSetNameError(ErrorContext errorContext, DataSet ourDataSet, IRIFReportDataScope currentScope)
        {
            Severity severity = Severity.Error;

            if (currentScope is DataRegion)
            {
                severity = Severity.Warning;
            }
            errorContext.Register(ProcessingErrorCode.rsInvalidInnerDataSetName, severity, currentScope.DataScopeObjectType, currentScope.Name, "DataSetName", m_parentDataSet.Name.MarkAsPrivate(), ourDataSet.Name.MarkAsPrivate());
        }
        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;
                    }
                }
            }
        }
 internal abstract bool ProcessOneRow(IRIFReportDataScope scope);
 private DataPipelineManager GetOrCreatePipelineManager(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet, IRIFReportDataScope targetScope)
 {
     if (this.m_pipelineManager != null)
     {
         if (this.m_pipelineManager.DataSetIndex == dataSet.IndexInCollection)
         {
             return(this.m_pipelineManager);
         }
         if (base.m_odpContext.IsTablixProcessingComplete(dataSet.IndexInCollection))
         {
             Global.Tracer.Trace(TraceLevel.Verbose, "Performance: While rendering the report: '{0}' the data set {1} was processed multiple times due to rendering traversal order.", base.m_odpContext.ReportContext.ItemPathAsString.MarkAsPrivate(), dataSet.Name.MarkAsPrivate());
         }
         this.CleanupPipelineManager();
         base.ShutdownSequentialReadersAndIdcDataManagers();
     }
     if (dataSet.AllowIncrementalProcessing)
     {
         this.m_pipelineManager = new IncrementalDataPipelineManager(base.m_odpContext, dataSet);
     }
     else
     {
         this.m_pipelineManager = new StreamingAtomicDataPipelineManager(base.m_odpContext, dataSet);
     }
     this.m_pipelineThrottle = new DataPipelineThrottle();
     this.m_pipelineThrottle.StartUsingContext(PipelineAdvanceMode.ToStoppingScopeInstance, targetScope);
     this.m_pipelineManager.StartProcessing();
     this.m_pipelineThrottle.StopUsingContext();
     this.TryProcessToNextScopeInstance(targetScope);
     return(this.m_pipelineManager);
 }
 private bool TryGetIdcDataManager(IRIFReportDataScope scope, out BaseIdcDataManager idcDataManager)
 {
     return(TryGetIdcDataManager(scope.DataScopeInfo.DataPipelineID, out idcDataManager));
 }
 public override bool ProcessOneRow(IRIFReportDataScope scope)
 {
     return(this.AdvanceDataPipeline(scope, PipelineAdvanceMode.ByOneRow));
 }
 private void AddIdcDataManager(IRIFReportDataScope scope, BaseIdcDataManager idcDataManager)
 {
     AddIdcDataManager(scope.DataScopeInfo.DataPipelineID, idcDataManager);
 }
 public override void CreatedScopeInstance(IRIFReportDataScope scope)
 {
     this.m_pipelineThrottle.CreatedScopeInstance(scope);
 }
Exemple #29
0
 internal override void CreatedScopeInstance(IRIFReportDataScope scope)
 {
 }