private DataRegionMemberInstance(OnDemandProcessingContext odpContext, ReportHierarchyNode memberDef, long firstRowOffset, int memberInstanceIndexWithinScopeLevel, int recursiveLevel, List <object> groupExpressionValues, object[] groupVariableValues) : base(firstRowOffset) { this.m_memberDef = memberDef; this.m_memberInstanceIndexWithinScopeLevel = memberInstanceIndexWithinScopeLevel; this.m_recursiveLevel = recursiveLevel; if (groupExpressionValues != null && groupExpressionValues.Count != 0) { this.m_groupExprValues = new object[groupExpressionValues.Count]; for (int i = 0; i < this.m_groupExprValues.Length; i++) { object obj = groupExpressionValues[i]; if (obj == DBNull.Value) { obj = null; } this.m_groupExprValues[i] = obj; } } base.StoreAggregates(odpContext, memberDef.Grouping.Aggregates); base.StoreAggregates(odpContext, memberDef.Grouping.RecursiveAggregates); base.StoreAggregates(odpContext, memberDef.Grouping.PostSortAggregates); base.StoreAggregates(odpContext, memberDef.RunningValues); if (memberDef.DataScopeInfo != null) { DataScopeInfo dataScopeInfo = memberDef.DataScopeInfo; base.StoreAggregates(odpContext, dataScopeInfo.AggregatesOfAggregates); base.StoreAggregates(odpContext, dataScopeInfo.PostSortAggregatesOfAggregates); base.StoreAggregates(odpContext, dataScopeInfo.RunningValuesOfAggregates); } this.m_variables = groupVariableValues; }
public void SetupEnvironment(OnDemandProcessingContext odpContext, int dataSetIndex) { base.SetupFields(odpContext, dataSetIndex); DataRegion dataRegionDef = this.m_cellDef.DataRegionDef; int num = 0; if (this.m_cellDef.AggregateIndexes != null) { base.SetupAggregates(odpContext, dataRegionDef.CellAggregates, this.m_cellDef.AggregateIndexes, ref num); } if (this.m_cellDef.PostSortAggregateIndexes != null) { base.SetupAggregates(odpContext, dataRegionDef.CellPostSortAggregates, this.m_cellDef.PostSortAggregateIndexes, ref num); } if (this.m_cellDef.RunningValueIndexes != null) { base.SetupAggregates(odpContext, dataRegionDef.CellRunningValues, this.m_cellDef.RunningValueIndexes, ref num); } if (this.m_cellDef.DataScopeInfo != null) { DataScopeInfo dataScopeInfo = this.m_cellDef.DataScopeInfo; if (dataScopeInfo.AggregatesOfAggregates != null) { base.SetupAggregates(odpContext, dataScopeInfo.AggregatesOfAggregates, ref num); } if (dataScopeInfo.PostSortAggregatesOfAggregates != null) { base.SetupAggregates(odpContext, dataScopeInfo.PostSortAggregatesOfAggregates, ref num); } if (dataScopeInfo.RunningValuesOfAggregates != null) { base.SetupAggregates(odpContext, dataScopeInfo.RunningValuesOfAggregates, ref num); } } }
public static bool ContainsServerAggregate <T>(List <T> aggs, string aggregateName) where T : DataAggregateInfo { if (aggs != null) { return(((IEnumerable <T>)aggs).Any((Func <T, bool>)((T agg) => DataScopeInfo.IsTargetServerAggregate((DataAggregateInfo)(object)agg, aggregateName)))); } return(false); }
public static bool IsChildScopeOf(IRIFReportDataScope childCandidate, IRIFReportDataScope parentCandidate) { if (!childCandidate.DataScopeInfo.IsSameScope(parentCandidate.DataScopeInfo)) { return(DataScopeInfo.IsSameOrChildScope(childCandidate, parentCandidate)); } return(false); }
private bool HasAggregatesForAtomicityCheck() { if (!DataScopeInfo.HasNonServerAggregates(this.m_aggregates) && !DataScopeInfo.HasAggregates(this.m_postSortAggregates) && !DataScopeInfo.HasAggregates(this.m_runningValues)) { return(this.m_dataScopeInfo.HasAggregatesOrRunningValues); } return(true); }
public void MergeFrom(DataScopeInfo otherScope) { this.m_aggregatesSpanGroupFilter |= otherScope.m_aggregatesSpanGroupFilter; this.m_hasAggregatesToUpdateAtRowScope |= otherScope.m_hasAggregatesToUpdateAtRowScope; this.m_runningValuesOfAggregates.AddRange(otherScope.m_runningValuesOfAggregates); this.m_aggregatesOfAggregates.MergeFrom(otherScope.m_aggregatesOfAggregates); this.m_postSortAggregatesOfAggregates.MergeFrom(otherScope.m_postSortAggregatesOfAggregates); }
private bool HasAggregatesForAtomicityCheck() { if (!DataScopeInfo.HasNonServerAggregates(this.m_aggregates)) { return(DataScopeInfo.HasAggregates(this.m_postSortAggregates)); } return(true); }
public Cell(int id, DataRegion dataRegion) : base(id) { this.m_dataRegionDef = dataRegion; this.m_aggregates = new List <DataAggregateInfo>(); this.m_postSortAggregates = new List <DataAggregateInfo>(); this.m_runningValues = new List <RunningValueInfo>(); this.m_dataScopeInfo = new DataScopeInfo(id); }
public DataScopeInfo PublishClone(AutomaticSubtotalContext context, int scopeID) { DataScopeInfo dataScopeInfo = new DataScopeInfo(scopeID); dataScopeInfo.m_dataSetName = this.m_dataSetName; if (this.m_joinInfo != null) { dataScopeInfo.m_joinInfo = this.m_joinInfo.PublishClone(context); } return(dataScopeInfo); }
public bool HasServerAggregate(string aggregateName) { if (this.m_aggregateIndexes == null) { return(false); } foreach (int aggregateIndex in this.m_aggregateIndexes) { if (DataScopeInfo.IsTargetServerAggregate(this.m_dataRegionDef.CellAggregates[aggregateIndex], aggregateName)) { return(true); } } return(false); }
public void SetupEnvironment(OnDemandProcessingContext odpContext) { base.SetupFields(odpContext, this.m_dataSetIndexInCollection); int num = 0; base.SetupAggregates(odpContext, this.m_dataRegionDef.Aggregates, ref num); base.SetupAggregates(odpContext, this.m_dataRegionDef.PostSortAggregates, ref num); base.SetupAggregates(odpContext, this.m_dataRegionDef.RunningValues, ref num); if (this.m_dataRegionDef.DataScopeInfo != null) { DataScopeInfo dataScopeInfo = this.m_dataRegionDef.DataScopeInfo; base.SetupAggregates(odpContext, dataScopeInfo.AggregatesOfAggregates, ref num); base.SetupAggregates(odpContext, dataScopeInfo.PostSortAggregatesOfAggregates, ref num); base.SetupAggregates(odpContext, dataScopeInfo.RunningValuesOfAggregates, ref num); } }
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); } } } } }
private DataCellInstance(OnDemandProcessingContext odpContext, Cell cellDef, DataAggregateObjResult[] runningValueValues, DataAggregateObjResult[] runningValueOfAggregateValues, long firstRowOffset) : base(firstRowOffset) { this.m_cellDef = cellDef; DataRegion dataRegionDef = this.m_cellDef.DataRegionDef; if (cellDef.AggregateIndexes != null) { base.StoreAggregates(odpContext, dataRegionDef.CellAggregates, cellDef.AggregateIndexes); } if (cellDef.PostSortAggregateIndexes != null) { base.StoreAggregates(odpContext, dataRegionDef.CellPostSortAggregates, cellDef.PostSortAggregateIndexes); } if (runningValueValues == null) { if (cellDef.RunningValueIndexes != null) { base.StoreAggregates(odpContext, dataRegionDef.CellRunningValues, cellDef.RunningValueIndexes); } } else if (runningValueValues != null) { base.StoreAggregates(runningValueValues); } if (cellDef.DataScopeInfo != null) { DataScopeInfo dataScopeInfo = cellDef.DataScopeInfo; if (dataScopeInfo.AggregatesOfAggregates != null) { base.StoreAggregates(odpContext, dataScopeInfo.AggregatesOfAggregates); } if (dataScopeInfo.PostSortAggregatesOfAggregates != null) { base.StoreAggregates(odpContext, dataScopeInfo.PostSortAggregatesOfAggregates); } if (runningValueOfAggregateValues != null) { base.StoreAggregates(runningValueOfAggregateValues); } } }
public void SetupEnvironment(OnDemandProcessingContext odpContext, int dataSetIndex) { base.SetupFields(odpContext, dataSetIndex); int num = 0; base.SetupAggregates(odpContext, this.m_memberDef.Grouping.Aggregates, ref num); base.SetupAggregates(odpContext, this.m_memberDef.Grouping.RecursiveAggregates, ref num); base.SetupAggregates(odpContext, this.m_memberDef.Grouping.PostSortAggregates, ref num); base.SetupAggregates(odpContext, this.m_memberDef.RunningValues, ref num); if (this.m_memberDef.DataScopeInfo != null) { DataScopeInfo dataScopeInfo = this.m_memberDef.DataScopeInfo; base.SetupAggregates(odpContext, dataScopeInfo.AggregatesOfAggregates, ref num); base.SetupAggregates(odpContext, dataScopeInfo.PostSortAggregatesOfAggregates, ref num); base.SetupAggregates(odpContext, dataScopeInfo.RunningValuesOfAggregates, ref num); } if (this.m_variables != null) { ScopeInstance.SetupVariables(odpContext, this.m_memberDef.Grouping.Variables, this.m_variables); } }
public static bool HasDecomposableAncestorWithNonLatestInstanceBinding(IRIFReportDataScope candidate) { while (candidate != null) { if (candidate.IsScope && candidate.DataScopeInfo.IsDecomposable && candidate.IsBoundToStreamingScopeInstance && !candidate.CurrentStreamingScopeInstance.Value().IsMostRecentlyCreatedScopeInstance) { return(true); } if (candidate.IsDataIntersectionScope) { IRIFReportIntersectionScope iRIFReportIntersectionScope = (IRIFReportIntersectionScope)candidate; if (!DataScopeInfo.HasDecomposableAncestorWithNonLatestInstanceBinding(iRIFReportIntersectionScope.ParentRowReportScope)) { return(DataScopeInfo.HasDecomposableAncestorWithNonLatestInstanceBinding(iRIFReportIntersectionScope.ParentColumnReportScope)); } return(true); } candidate = candidate.ParentReportScope; } return(false); }
public static bool IsSameOrChildScope(IRIFReportDataScope childCandidate, IRIFReportDataScope parentCandidate) { while (childCandidate != null) { if (childCandidate.DataScopeInfo.ScopeID == parentCandidate.DataScopeInfo.ScopeID) { return(true); } if (childCandidate.IsDataIntersectionScope) { IRIFReportIntersectionScope iRIFReportIntersectionScope = (IRIFReportIntersectionScope)childCandidate; if (!DataScopeInfo.IsSameOrChildScope(iRIFReportIntersectionScope.ParentRowReportScope, parentCandidate)) { return(DataScopeInfo.IsSameOrChildScope(iRIFReportIntersectionScope.ParentColumnReportScope, parentCandidate)); } return(true); } childCandidate = childCandidate.ParentReportScope; } return(false); }
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); }
public bool IsSameScope(DataScopeInfo candidateScopeInfo) { return(this.m_scopeID == candidateScopeInfo.ScopeID); }
public override void Deserialize(IntermediateFormatReader reader) { base.Deserialize(reader); reader.RegisterDeclaration(Cell.m_Declaration); while (reader.NextMember()) { switch (reader.CurrentMember.MemberName) { case MemberName.ExprHostID: this.m_exprHostID = reader.ReadInt32(); break; case MemberName.ParentRowID: base.m_parentIDOwner = reader.ReadReference <IDOwner>(this); if (base.m_parentIDOwner != null) { this.m_parentRowID = base.m_parentIDOwner.ID; } break; case MemberName.ParentColumnID: this.m_parentColumnIDOwner = reader.ReadReference <IDOwner>(this); if (this.m_parentColumnIDOwner != null) { this.m_parentColumnID = this.m_parentColumnIDOwner.ID; } break; case MemberName.IndexInCollection: this.m_indexInCollection = reader.ReadInt32(); break; case MemberName.HasInnerGroupTreeHierarchy: this.m_hasInnerGroupTreeHierarchy = reader.ReadBoolean(); break; case MemberName.DataRegionDef: this.m_dataRegionDef = reader.ReadReference <DataRegion>(this); break; case MemberName.AggregateIndexes: this.m_aggregateIndexes = reader.ReadListOfPrimitives <int>(); break; case MemberName.PostSortAggregateIndexes: this.m_postSortAggregateIndexes = reader.ReadListOfPrimitives <int>(); break; case MemberName.RunningValueIndexes: this.m_runningValueIndexes = reader.ReadListOfPrimitives <int>(); break; case MemberName.NeedToCacheDataRows: this.m_needToCacheDataRows = reader.ReadBoolean(); break; case MemberName.InScopeEventSources: this.m_inScopeEventSources = reader.ReadGenericListOfReferences <IInScopeEventSource>(this); break; case MemberName.InDynamicRowAndColumnContext: this.m_inDynamicRowAndColumnContext = reader.ReadBoolean(); break; case MemberName.TextboxesInScope: this.m_textboxesInScope = reader.ReadByteArray(); break; case MemberName.VariablesInScope: this.m_variablesInScope = reader.ReadByteArray(); break; case MemberName.DataScopeInfo: this.m_dataScopeInfo = reader.ReadRIFObject <DataScopeInfo>(); break; default: Global.Tracer.Assert(false); break; } } }
public bool IsChildScopeOf(IRIFReportDataScope candidateScope) { return(DataScopeInfo.IsChildScopeOf(this, candidateScope)); }