Ejemplo n.º 1
0
 internal void SetRelationship(string dataSetName, List <IdcRelationship> relationships)
 {
     m_dataSetName = dataSetName;
     if (relationships != null)
     {
         m_joinInfo = new IntersectJoinInfo(relationships);
     }
 }
Ejemplo n.º 2
0
 internal void SetRelationship(string dataSetName, IdcRelationship relationship)
 {
     m_dataSetName = dataSetName;
     if (relationship != null)
     {
         m_joinInfo = new LinearJoinInfo(relationship);
     }
 }
Ejemplo n.º 3
0
        public void Deserialize(IntermediateFormatReader reader)
        {
            reader.RegisterDeclaration(m_Declaration);
            while (reader.NextMember())
            {
                switch (reader.CurrentMember.MemberName)
                {
                case MemberName.AggregatesSpanGroupFilter:
                    m_aggregatesSpanGroupFilter = reader.ReadBoolean();
                    break;

                case MemberName.AggregatesOfAggregates:
                    m_aggregatesOfAggregates = (BucketedDataAggregateInfos)reader.ReadRIFObject();
                    break;

                case MemberName.PostSortAggregatesOfAggregates:
                    m_postSortAggregatesOfAggregates = (BucketedDataAggregateInfos)reader.ReadRIFObject();
                    break;

                case MemberName.RunningValuesOfAggregates:
                    m_runningValuesOfAggregates = reader.ReadGenericListOfRIFObjects <RunningValueInfo>();
                    break;

                case MemberName.ScopeID:
                    m_scopeID = reader.ReadInt32();
                    break;

                case MemberName.HasAggregatesToUpdateAtRowScope:
                    m_hasAggregatesToUpdateAtRowScope = reader.ReadBoolean();
                    break;

                case MemberName.IsDecomposable:
                    m_isDecomposable = reader.ReadBoolean();
                    break;

                case MemberName.DataSet:
                    m_dataSet = reader.ReadReference <DataSet>(this);
                    break;

                case MemberName.JoinInfo:
                    m_joinInfo = (JoinInfo)reader.ReadRIFObject();
                    break;

                case MemberName.DataPipelineID:
                    m_dataPipelineID = reader.ReadInt32();
                    break;

                case MemberName.GroupingFieldIndicesForServerAggregates:
                    m_groupingFieldIndicesForServerAggregates = reader.ReadListOfPrimitives <int>();
                    break;

                default:
                    Global.Tracer.Assert(condition: false);
                    break;
                }
            }
        }
Ejemplo n.º 4
0
        internal void ValidateDataSetBindingAndRelationships(ScopeTree scopeTree, IRIFReportDataScope scope, ErrorContext errorContext)
        {
            if (m_dataSet != null)
            {
                return;
            }
            ParentDataSetContainer parentDataSetContainer = DetermineParentDataSets(scopeTree, scope);

            if (m_dataSetName == null)
            {
                BindToParentDataSet(scopeTree, scope, errorContext, parentDataSetContainer);
            }
            else
            {
                BindToNamedDataSet(scopeTree, scope, errorContext, parentDataSetContainer);
            }
            if (m_dataSet == null)
            {
                return;
            }
            if (scopeTree.GetParentDataRegion(scope) == null && m_joinInfo != null)
            {
                errorContext.Register(ProcessingErrorCode.rsInvalidRelationshipTopLevelDataRegion, Severity.Error, scope.DataScopeObjectType, scope.Name, "Relationship");
                m_joinInfo = null;
            }
            if (parentDataSetContainer != null && m_joinInfo == null)
            {
                if (parentDataSetContainer.Count == 1)
                {
                    m_joinInfo = new LinearJoinInfo();
                }
                else
                {
                    m_joinInfo = new IntersectJoinInfo();
                }
            }
            if (m_joinInfo != null)
            {
                if (!m_joinInfo.ValidateRelationships(scopeTree, errorContext, m_dataSet, parentDataSetContainer, scope))
                {
                    m_joinInfo = null;
                }
                if (m_joinInfo == null && m_dataSetName != null && m_dataSet != null && !DataSet.AreEqualById(parentDataSetContainer.ParentDataSet, m_dataSet))
                {
                    UpdateDataSet(parentDataSetContainer.ParentDataSet, scope);
                }
            }
        }
Ejemplo n.º 5
0
        internal override void AddMappedFieldIndices(List <int> parentFieldIndices, DataSet parentDataSet, DataSet ourDataSet, List <int> ourFieldIndices)
        {
            Relationship relationship;

            if (DataSet.AreEqualById(m_rowParentDataSet, parentDataSet))
            {
                relationship = GetActiveRowRelationship(ourDataSet);
            }
            else if (DataSet.AreEqualById(m_columnParentDataSet, parentDataSet))
            {
                relationship = GetActiveColumnRelationship(ourDataSet);
            }
            else
            {
                Global.Tracer.Assert(condition: false, "Invalid parent data set");
                relationship = null;
            }
            JoinInfo.AddMappedFieldIndices(relationship, parentFieldIndices, ourFieldIndices);
        }
Ejemplo n.º 6
0
 internal override void AddMappedFieldIndices(List <int> parentFieldIndices, DataSet parentDataSet, DataSet ourDataSet, List <int> ourFieldIndices)
 {
     Global.Tracer.Assert(DataSet.AreEqualById(m_parentDataSet, parentDataSet), "Invalid parent data set");
     JoinInfo.AddMappedFieldIndices(GetActiveRelationship(ourDataSet), parentFieldIndices, ourFieldIndices);
 }
Ejemplo n.º 7
0
 internal DefaultRelationship GetDefaultRelationship(DataSet parentDataSet)
 {
     return(JoinInfo.FindActiveRelationship(m_defaultRelationships, parentDataSet));
 }