public override void AddMappedFieldIndices(List <int> parentFieldIndices, DataSet parentDataSet, DataSet ourDataSet, List <int> ourFieldIndices) { Global.Tracer.Assert(DataSet.AreEqualById(this.m_parentDataSet, parentDataSet), "Invalid parent data set"); Relationship activeRelationship = this.GetActiveRelationship(ourDataSet); JoinInfo.AddMappedFieldIndices(activeRelationship, parentFieldIndices, ourFieldIndices); }
public void SetRelationship(string dataSetName, List <IdcRelationship> relationships) { this.m_dataSetName = dataSetName; if (relationships != null) { this.m_joinInfo = new IntersectJoinInfo(relationships); } }
public void SetRelationship(string dataSetName, IdcRelationship relationship) { this.m_dataSetName = dataSetName; if (relationship != null) { this.m_joinInfo = new LinearJoinInfo(relationship); } }
public void Deserialize(IntermediateFormatReader reader) { reader.RegisterDeclaration(DataScopeInfo.m_Declaration); while (reader.NextMember()) { switch (reader.CurrentMember.MemberName) { case MemberName.AggregatesSpanGroupFilter: this.m_aggregatesSpanGroupFilter = reader.ReadBoolean(); break; case MemberName.AggregatesOfAggregates: this.m_aggregatesOfAggregates = (BucketedDataAggregateInfos)reader.ReadRIFObject(); break; case MemberName.PostSortAggregatesOfAggregates: this.m_postSortAggregatesOfAggregates = (BucketedDataAggregateInfos)reader.ReadRIFObject(); break; case MemberName.RunningValuesOfAggregates: this.m_runningValuesOfAggregates = reader.ReadGenericListOfRIFObjects <RunningValueInfo>(); break; case MemberName.ScopeID: this.m_scopeID = reader.ReadInt32(); break; case MemberName.HasAggregatesToUpdateAtRowScope: this.m_hasAggregatesToUpdateAtRowScope = reader.ReadBoolean(); break; case MemberName.IsDecomposable: this.m_isDecomposable = reader.ReadBoolean(); break; case MemberName.DataSet: this.m_dataSet = reader.ReadReference <DataSet>(this); break; case MemberName.JoinInfo: this.m_joinInfo = (JoinInfo)reader.ReadRIFObject(); break; case MemberName.DataPipelineID: this.m_dataPipelineID = reader.ReadInt32(); break; case MemberName.GroupingFieldIndicesForServerAggregates: this.m_groupingFieldIndicesForServerAggregates = reader.ReadListOfPrimitives <int>(); break; default: Global.Tracer.Assert(false); break; } } }
protected Relationship GetActiveRelationship(DataSet ourDataSet, DataSet parentDataSet) { if (this.m_relationships == null && (ourDataSet == null || ourDataSet.DefaultRelationships == null)) { return(null); } Relationship relationship = JoinInfo.FindActiveRelationship(this.m_relationships, parentDataSet); if (relationship == null && ourDataSet != null) { relationship = ourDataSet.GetDefaultRelationship(parentDataSet); } return(relationship); }
public void ValidateDataSetBindingAndRelationships(ScopeTree scopeTree, IRIFReportDataScope scope, ErrorContext errorContext) { if (this.m_dataSet == null) { ParentDataSetContainer parentDataSetContainer = DataScopeInfo.DetermineParentDataSets(scopeTree, scope); if (this.m_dataSetName == null) { this.BindToParentDataSet(scopeTree, scope, errorContext, parentDataSetContainer); } else { this.BindToNamedDataSet(scopeTree, scope, errorContext, parentDataSetContainer); } if (this.m_dataSet != null) { if (scopeTree.GetParentDataRegion(scope) == null && this.m_joinInfo != null) { errorContext.Register(ProcessingErrorCode.rsInvalidRelationshipTopLevelDataRegion, Severity.Error, scope.DataScopeObjectType, scope.Name, "Relationship"); this.m_joinInfo = null; } if (parentDataSetContainer != null && this.m_joinInfo == null) { if (parentDataSetContainer.Count == 1) { this.m_joinInfo = new LinearJoinInfo(); } else { this.m_joinInfo = new IntersectJoinInfo(); } } if (this.m_joinInfo != null) { if (!this.m_joinInfo.ValidateRelationships(scopeTree, errorContext, this.m_dataSet, parentDataSetContainer, scope)) { this.m_joinInfo = null; } if (this.m_joinInfo == null && this.m_dataSetName != null && this.m_dataSet != null && !DataSet.AreEqualById(parentDataSetContainer.ParentDataSet, this.m_dataSet)) { this.UpdateDataSet(parentDataSetContainer.ParentDataSet, scope); } } } } }
public override void AddMappedFieldIndices(List <int> parentFieldIndices, DataSet parentDataSet, DataSet ourDataSet, List <int> ourFieldIndices) { Relationship relationship; if (DataSet.AreEqualById(this.m_rowParentDataSet, parentDataSet)) { relationship = this.GetActiveRowRelationship(ourDataSet); } else if (DataSet.AreEqualById(this.m_columnParentDataSet, parentDataSet)) { relationship = this.GetActiveColumnRelationship(ourDataSet); } else { Global.Tracer.Assert(false, "Invalid parent data set"); relationship = null; } JoinInfo.AddMappedFieldIndices(relationship, parentFieldIndices, ourFieldIndices); }
public DefaultRelationship GetDefaultRelationship(DataSet parentDataSet) { return(JoinInfo.FindActiveRelationship(this.m_defaultRelationships, parentDataSet)); }