public override void Deserialize(IntermediateFormatReader reader) { base.Deserialize(reader); reader.RegisterDeclaration(m_declaration); while (reader.NextMember()) { switch (reader.CurrentMember.MemberName) { case MemberName.Grouping: m_grouping = (RuntimeGroupingObj)reader.ReadRIFObject(); if (m_grouping != null) { m_grouping.SetOwner(this); } break; case MemberName.Expression: m_expression = (RuntimeExpressionInfo)reader.ReadRIFObject(); break; case MemberName.HierarchyRoot: m_hierarchyRoot = (RuntimeHierarchyObjReference)reader.ReadRIFObject(); break; case MemberName.HierarchyObjs: m_hierarchyObjs = reader.ReadListOfRIFObjects <List <IReference <RuntimeHierarchyObj> > >(); break; default: Global.Tracer.Assert(condition: false); break; } } }
void IPersistable.Deserialize(IntermediateFormatReader reader) { reader.RegisterDeclaration(RuntimeDataRowSortHierarchyObj.m_declaration); PersistenceHelper persistenceHelper = reader.PersistenceHelper; while (reader.NextMember()) { switch (reader.CurrentMember.MemberName) { case MemberName.HierarchyRoot: this.m_hierarchyRoot = (IReference <IHierarchyObj>)reader.ReadRIFObject(); break; case MemberName.DataRowHolder: this.m_dataRowHolder = (RuntimeSortDataHolder)reader.ReadRIFObject(); break; case MemberName.Expression: this.m_sortExpression = (RuntimeExpressionInfo)reader.ReadRIFObject(); break; case MemberName.SortTree: this.m_sortTree = (BTree)reader.ReadRIFObject(); break; default: Global.Tracer.Assert(false); break; } } }
private ScopeValue CreateScopeValueFromSortExpression(int sortCursor, ScopeIDType scopeIdType) { RuntimeExpressionInfo runtimeExpression = new RuntimeExpressionInfo(this.m_sorting.SortExpressions, this.m_sorting.ExprHost, this.m_sorting.SortDirections, sortCursor); object value = this.m_odpContext.ReportRuntime.EvaluateRuntimeExpression(runtimeExpression, ObjectType.Grouping, this.m_memberDef.DataRegionMemberDefinition.Grouping.Name, "Sort"); return(new ScopeValue(this.NormalizeValue(value), scopeIdType)); }
internal RuntimeDataRowSortHierarchyObj(IHierarchyObj outerHierarchy, int depth) { m_hierarchyRoot = outerHierarchy.HierarchyRoot; int num = outerHierarchy.ExpressionIndex + 1; Microsoft.ReportingServices.ReportIntermediateFormat.Sorting sortingDef = ((IDataRowSortOwner)m_hierarchyRoot.Value()).SortingDef; if (sortingDef.SortExpressions == null || num >= sortingDef.SortExpressions.Count) { m_dataRowHolder = new RuntimeSortDataHolder(); return; } m_sortExpression = new RuntimeExpressionInfo(sortingDef.SortExpressions, sortingDef.ExprHost, sortingDef.SortDirections, num); m_sortTree = new BTree(this, OdpContext, depth); }
internal override bool SortAndFilter(AggregateUpdateContext aggContext) { if (m_odpContext.HasSecondPassOperation(SecondPassOperations.FilteringOrAggregatesOrDomainScope)) { CopyDomainScopeGroupInstancesFromTarget(); } RuntimeGroupingObj grouping = m_grouping; bool ascending = DetermineTraversalDirection(); bool result = true; bool processSecondPassSorting = ProcessSecondPassSorting; bool flag = (SecondPassOperations.FilteringOrAggregatesOrDomainScope & m_odpContext.SecondPassOperation) != 0 && (m_hierarchyDef.HasFilters || m_hierarchyDef.HasInnerFilters); if (processSecondPassSorting) { m_expression = new RuntimeExpressionInfo(m_hierarchyDef.Sorting.SortExpressions, m_hierarchyDef.Sorting.ExprHost, m_hierarchyDef.Sorting.SortDirections, 0); m_groupingType = RuntimeGroupingObj.GroupingTypes.Sort; m_grouping = new RuntimeGroupingObjTree(this, m_objectType); } else if (flag) { m_groupingType = RuntimeGroupingObj.GroupingTypes.None; m_grouping = new RuntimeGroupingObjLinkedList(this, m_objectType); } if (flag) { m_groupFilters = new Filters(Filters.FilterTypes.GroupFilter, (IReference <Microsoft.ReportingServices.ReportProcessing.ReportProcessing.IFilterOwner>)base.SelfReference, m_hierarchyDef.Grouping.Filters, Microsoft.ReportingServices.ReportProcessing.ObjectType.Grouping, m_hierarchyDef.Grouping.Name, m_odpContext, base.Depth + 1); } m_processingStage = ProcessingStages.SortAndFilter; m_lastChild = null; grouping.Traverse(ProcessingStages.SortAndFilter, ascending, aggContext); if (flag) { m_groupFilters.FinishReadingGroups(aggContext); if (!processSecondPassSorting && null == m_lastChild) { if (m_firstChild != null) { m_firstChild.Free(); } m_firstChild = null; result = false; } } if (grouping != m_grouping) { grouping.Cleanup(); } return(result); }
void IDataRowSortOwner.DataRowSortTraverse() { try { ITraversalContext traversalContext = new DataRowSortOwnerTraversalContext(this); m_sortedDataRowTree.Traverse(ProcessingStages.Grouping, m_dataRowSortExpression.Direction, traversalContext); } finally { m_inDataRowSortPhase = false; m_sortedDataRowTree.Dispose(); m_sortedDataRowTree = null; m_dataRowSortExpression = null; } }
private void ConstructorHelper(int exprIndex, RuntimeHierarchyObjReference hierarchyRoot) { m_hierarchyRoot = hierarchyRoot; using (m_hierarchyRoot.PinValue()) { RuntimeGroupRootObj runtimeGroupRootObj = m_hierarchyRoot.Value() as RuntimeGroupRootObj; Global.Tracer.Assert(runtimeGroupRootObj != null, "(null != groupRoot)"); List <Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo> list; IndexedExprHost expressionsHost; List <bool> directions; if (ProcessingStages.Grouping == runtimeGroupRootObj.ProcessingStage) { list = runtimeGroupRootObj.GroupExpressions; expressionsHost = runtimeGroupRootObj.GroupExpressionHost; directions = runtimeGroupRootObj.GroupDirections; } else { Global.Tracer.Assert(ProcessingStages.SortAndFilter == runtimeGroupRootObj.ProcessingStage, "(ProcessingStages.SortAndFilter == groupRoot.ProcessingStage)"); list = runtimeGroupRootObj.SortExpressions; expressionsHost = runtimeGroupRootObj.SortExpressionHost; directions = runtimeGroupRootObj.SortDirections; } if (exprIndex == -1 || exprIndex >= list.Count) { m_hierarchyObjs = new List <IReference <RuntimeHierarchyObj> >(); RuntimeGroupLeafObjReference runtimeGroupLeafObjReference = null; _ = m_odpContext.TablixProcessingScalabilityCache; if (ProcessingStages.Grouping == runtimeGroupRootObj.ProcessingStage) { runtimeGroupLeafObjReference = runtimeGroupRootObj.CreateGroupLeaf(); if (!runtimeGroupRootObj.HasParent) { runtimeGroupRootObj.AddChildWithNoParent(runtimeGroupLeafObjReference); } } if (null != runtimeGroupLeafObjReference) { m_hierarchyObjs.Add(runtimeGroupLeafObjReference); } } else { m_expression = new RuntimeExpressionInfo(list, expressionsHost, directions, exprIndex); m_grouping = RuntimeGroupingObj.CreateGroupingObj(runtimeGroupRootObj.GroupingType, this, m_objectType); } } }
public RuntimeDataRowSortHierarchyObj(IHierarchyObj outerHierarchy, int depth) { this.m_hierarchyRoot = outerHierarchy.HierarchyRoot; int num = outerHierarchy.ExpressionIndex + 1; IDataRowSortOwner dataRowSortOwner = (IDataRowSortOwner)this.m_hierarchyRoot.Value(); AspNetCore.ReportingServices.ReportIntermediateFormat.Sorting sortingDef = dataRowSortOwner.SortingDef; if (sortingDef.SortExpressions == null || num >= sortingDef.SortExpressions.Count) { this.m_dataRowHolder = new RuntimeSortDataHolder(); } else { this.m_sortExpression = new RuntimeExpressionInfo(sortingDef.SortExpressions, sortingDef.ExprHost, sortingDef.SortDirections, num); this.m_sortTree = new BTree(this, this.OdpContext, depth); } }
public object EvaluateDataRowSortExpression(RuntimeExpressionInfo sortExpression) { return m_odpContext.ReportRuntime.EvaluateRuntimeExpression(sortExpression, base.ObjectType, m_dataRegionDef.Name, "Sort"); }
public override void Deserialize(IntermediateFormatReader reader) { base.Deserialize(reader); reader.RegisterDeclaration(m_declaration); IScalabilityCache scalabilityCache = reader.PersistenceHelper as IScalabilityCache; while (reader.NextMember()) { switch (reader.CurrentMember.MemberName) { case MemberName.DataRegionDef: { int id2 = reader.ReadInt32(); m_dataRegionDef = (Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion)scalabilityCache.FetchStaticReference(id2); break; } case MemberName.OuterScope: m_outerScope = (IReference<IScope>)reader.ReadRIFObject(); break; case MemberName.FirstRow: m_firstRow = (DataFieldRow)reader.ReadRIFObject(); break; case MemberName.FirstRowIsAggregate: m_firstRowIsAggregate = reader.ReadBoolean(); break; case MemberName.Filters: { int id = reader.ReadInt32(); m_filters = (Filters)scalabilityCache.FetchStaticReference(id); break; } case MemberName.NonCustomAggregates: m_nonCustomAggregates = reader.ReadListOfRIFObjects<List<Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj>>(); break; case MemberName.CustomAggregates: m_customAggregates = reader.ReadListOfRIFObjects<List<Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj>>(); break; case MemberName.DataAction: m_dataAction = (DataActions)reader.ReadEnum(); break; case MemberName.OuterDataAction: m_outerDataAction = (DataActions)reader.ReadEnum(); break; case MemberName.RunningValues: m_runningValues = reader.ReadListOfPrimitives<string>(); break; case MemberName.PreviousValues: m_previousValues = reader.ReadListOfPrimitives<string>(); break; case MemberName.RunningValueValues: m_runningValueValues = reader.ReadArrayOfRIFObjects<Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult>(); break; case MemberName.RunningValueOfAggregateValues: m_runningValueOfAggregateValues = reader.ReadArrayOfRIFObjects<Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult>(); break; case MemberName.PostSortAggregates: m_postSortAggregates = reader.ReadListOfRIFObjects<List<Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj>>(); break; case MemberName.DataRows: m_dataRows = reader.ReadRIFObject<ScalableList<DataFieldRow>>(); break; case MemberName.InnerDataAction: m_innerDataAction = (DataActions)reader.ReadEnum(); break; case MemberName.UserSortTargetInfo: m_userSortTargetInfo = (RuntimeUserSortTargetInfo)reader.ReadRIFObject(); break; case MemberName.SortFilterExpressionScopeInfoIndices: m_sortFilterExpressionScopeInfoIndices = reader.ReadInt32Array(); break; case MemberName.InDataRowSortPhase: m_inDataRowSortPhase = reader.ReadBoolean(); break; case MemberName.SortedDataRowTree: m_sortedDataRowTree = (BTree)reader.ReadRIFObject(); break; case MemberName.DataRowSortExpression: m_dataRowSortExpression = (RuntimeExpressionInfo)reader.ReadRIFObject(); break; case MemberName.AggregatesOfAggregates: m_aggregatesOfAggregates = (BucketedDataAggregateObjs)reader.ReadRIFObject(); break; case MemberName.PostSortAggregatesOfAggregates: m_postSortAggregatesOfAggregates = (BucketedDataAggregateObjs)reader.ReadRIFObject(); break; case MemberName.HasProcessedAggregateRow: m_hasProcessedAggregateRow = reader.ReadBoolean(); break; default: Global.Tracer.Assert(condition: false); break; } } }
protected void ConstructorHelper(ref DataActions dataAction, bool onePassProcess, out bool handleMyDataAction, out DataActions innerDataAction) { innerDataAction = m_dataAction; handleMyDataAction = false; if (onePassProcess) { if (m_dataRegionDef.RunningValues != null && 0 < m_dataRegionDef.RunningValues.Count) { RuntimeDataRegionObj.CreateAggregates(m_odpContext, m_dataRegionDef.RunningValues, ref m_nonCustomAggregates); } RuntimeDataRegionObj.CreateAggregates(m_odpContext, m_dataRegionDef.PostSortAggregates, ref m_nonCustomAggregates); RuntimeDataRegionObj.CreateAggregates(m_odpContext, m_dataRegionDef.CellPostSortAggregates, ref m_nonCustomAggregates); } else { if (m_dataRegionDef.RunningValues != null && 0 < m_dataRegionDef.RunningValues.Count) { m_dataAction |= DataActions.PostSortAggregates; } if (m_dataRegionDef.PostSortAggregates != null && m_dataRegionDef.PostSortAggregates.Count != 0) { RuntimeDataRegionObj.CreateAggregates(m_odpContext, m_dataRegionDef.PostSortAggregates, ref m_postSortAggregates); m_dataAction |= DataActions.PostSortAggregates; handleMyDataAction = true; } if (m_dataRegionDef.DataScopeInfo != null) { DataScopeInfo dataScopeInfo = m_dataRegionDef.DataScopeInfo; if (dataScopeInfo.PostSortAggregatesOfAggregates != null && !dataScopeInfo.PostSortAggregatesOfAggregates.IsEmpty) { RuntimeDataRegionObj.CreateAggregates(m_odpContext, dataScopeInfo.PostSortAggregatesOfAggregates, ref m_postSortAggregatesOfAggregates); } if (dataScopeInfo.HasAggregatesToUpdateAtRowScope) { m_dataAction |= DataActions.AggregatesOfAggregates; handleMyDataAction = true; } } if (handleMyDataAction) { innerDataAction = DataActions.None; } else { innerDataAction = m_dataAction; } } m_inDataRowSortPhase = (m_dataRegionDef.Sorting != null && m_dataRegionDef.Sorting.ShouldApplySorting); if (m_inDataRowSortPhase) { m_sortedDataRowTree = new BTree(this, m_odpContext, m_depth); m_dataRowSortExpression = new RuntimeExpressionInfo(m_dataRegionDef.Sorting.SortExpressions, m_dataRegionDef.Sorting.ExprHost, m_dataRegionDef.Sorting.SortDirections, 0); m_odpContext.AddSpecialDataRowSort((IReference <IDataRowSortOwner>)base.SelfReference); } m_dataRegionDef.ResetInstanceIndexes(); m_outerGroupingCounters = new int[m_dataRegionDef.OuterGroupingDynamicMemberCount]; for (int i = 0; i < m_outerGroupingCounters.Length; i++) { m_outerGroupingCounters[i] = -1; } }
private static List <Declaration> BuildDeclarations() { List <Declaration> list = new List <Declaration>(83); list.Add(Aggregate.GetDeclaration()); list.Add(AggregateRow.GetDeclaration()); list.Add(Avg.GetDeclaration()); list.Add(BTree.GetDeclaration()); list.Add(BTreeNode.GetDeclaration()); list.Add(BTreeNodeTuple.GetDeclaration()); list.Add(BTreeNodeTupleList.GetDeclaration()); list.Add(BTreeNodeHierarchyObj.GetDeclaration()); list.Add(CalculatedFieldWrapperImpl.GetDeclaration()); list.Add(ChildLeafInfo.GetDeclaration()); list.Add(Count.GetDeclaration()); list.Add(CountDistinct.GetDeclaration()); list.Add(CountRows.GetDeclaration()); list.Add(DataAggregateObj.GetDeclaration()); list.Add(DataAggregateObjResult.GetDeclaration()); list.Add(DataRegionMemberInstance.GetDeclaration()); list.Add(DataFieldRow.GetDeclaration()); list.Add(FieldImpl.GetDeclaration()); list.Add(First.GetDeclaration()); list.Add(Last.GetDeclaration()); list.Add(Max.GetDeclaration()); list.Add(Min.GetDeclaration()); list.Add(Previous.GetDeclaration()); list.Add(RuntimeCell.GetDeclaration()); list.Add(RuntimeCells.GetDeclaration()); list.Add(RuntimeCellWithContents.GetDeclaration()); list.Add(RuntimeChartCriCell.GetDeclaration()); list.Add(RuntimeChartCriGroupLeafObj.GetDeclaration()); list.Add(RuntimeChartCriObj.GetDeclaration()); list.Add(RuntimeChartObj.GetDeclaration()); list.Add(RuntimeCriObj.GetDeclaration()); list.Add(RuntimeDataRegionObj.GetDeclaration()); list.Add(RuntimeDataTablixObj.GetDeclaration()); list.Add(RuntimeDataTablixGroupLeafObj.GetDeclaration()); list.Add(RuntimeDataTablixGroupRootObj.GetDeclaration()); list.Add(RuntimeDataTablixMemberObj.GetDeclaration()); list.Add(RuntimeDataTablixWithScopedItemsObj.GetDeclaration()); list.Add(RuntimeDataTablixWithScopedItemsGroupLeafObj.GetDeclaration()); list.Add(RuntimeDetailObj.GetDeclaration()); list.Add(RuntimeExpressionInfo.GetDeclaration()); list.Add(RuntimeGroupLeafObj.GetDeclaration()); list.Add(RuntimeGroupObj.GetDeclaration()); list.Add(RuntimeGroupRootObj.GetDeclaration()); list.Add(RuntimeGroupingObj.GetDeclaration()); list.Add(RuntimeHierarchyObj.GetDeclaration()); list.Add(RuntimeMemberObj.GetDeclaration()); list.Add(RuntimeRDLDataRegionObj.GetDeclaration()); list.Add(RuntimeRICollection.GetDeclaration()); list.Add(RuntimeSortDataHolder.GetDeclaration()); list.Add(RuntimeSortFilterEventInfo.GetDeclaration()); list.Add(RuntimeSortFilterEventInfo.SortExpressionScopeInstanceHolder.GetDeclaration()); list.Add(RuntimeSortFilterEventInfo.SortFilterExpressionScopeObj.GetDeclaration()); list.Add(RuntimeSortFilterEventInfo.SortScopeValuesHolder.GetDeclaration()); list.Add(RuntimeSortHierarchyObj.GetDeclaration()); list.Add(RuntimeSortHierarchyObj.SortHierarchyStructure.GetDeclaration()); list.Add(RuntimeDataRowSortHierarchyObj.GetDeclaration()); list.Add(RuntimeTablixCell.GetDeclaration()); list.Add(RuntimeTablixGroupLeafObj.GetDeclaration()); list.Add(RuntimeTablixObj.GetDeclaration()); list.Add(RuntimeUserSortTargetInfo.GetDeclaration()); list.Add(ScopeInstance.GetDeclaration()); list.Add(ScopeLookupTable.GetDeclaration()); list.Add(StDev.GetDeclaration()); list.Add(StDevP.GetDeclaration()); list.Add(Sum.GetDeclaration()); list.Add(Var.GetDeclaration()); list.Add(VarBase.GetDeclaration()); list.Add(VarP.GetDeclaration()); list.Add(Filters.FilterKey.GetDeclaration()); list.Add(RuntimeGaugePanelObj.GetDeclaration()); list.Add(LookupMatches.GetDeclaration()); list.Add(LookupMatchesWithRows.GetDeclaration()); list.Add(LookupTable.GetDeclaration()); list.Add(RuntimeMapDataRegionObj.GetDeclaration()); list.Add(DataScopeInfo.GetDeclaration()); list.Add(BucketedDataAggregateObjs.GetDeclaration()); list.Add(DataAggregateObjBucket.GetDeclaration()); list.Add(RuntimeGroupingObjHash.GetDeclaration()); list.Add(RuntimeGroupingObjTree.GetDeclaration()); list.Add(RuntimeGroupingObjDetail.GetDeclaration()); list.Add(RuntimeGroupingObjDetailUserSort.GetDeclaration()); list.Add(RuntimeGroupingObjLinkedList.GetDeclaration()); list.Add(RuntimeGroupingObjNaturalGroup.GetDeclaration()); return(list); }
public bool TryCreateObject(ObjectType objectType, out IPersistable persistObj) { switch (objectType) { case ObjectType.Aggregate: persistObj = new Aggregate(); break; case ObjectType.AggregateRow: persistObj = new AggregateRow(); break; case ObjectType.Avg: persistObj = new Avg(); break; case ObjectType.BTree: persistObj = new BTree(); break; case ObjectType.BTreeNode: persistObj = new BTreeNode(); break; case ObjectType.BTreeNodeTupleList: persistObj = new BTreeNodeTupleList(); break; case ObjectType.BTreeNodeTuple: persistObj = new BTreeNodeTuple(); break; case ObjectType.BTreeNodeHierarchyObj: persistObj = new BTreeNodeHierarchyObj(); break; case ObjectType.CalculatedFieldWrapperImpl: persistObj = new CalculatedFieldWrapperImpl(); break; case ObjectType.ChildLeafInfo: persistObj = new ChildLeafInfo(); break; case ObjectType.Count: persistObj = new Count(); break; case ObjectType.CountDistinct: persistObj = new CountDistinct(); break; case ObjectType.CountRows: persistObj = new CountRows(); break; case ObjectType.DataAggregateObj: persistObj = new DataAggregateObj(); break; case ObjectType.DataAggregateObjResult: persistObj = new DataAggregateObjResult(); break; case ObjectType.DataFieldRow: persistObj = new DataFieldRow(); break; case ObjectType.DataRegionMemberInstance: persistObj = new DataRegionMemberInstance(); break; case ObjectType.FieldImpl: persistObj = new FieldImpl(); break; case ObjectType.First: persistObj = new First(); break; case ObjectType.Last: persistObj = new Last(); break; case ObjectType.Max: persistObj = new Max(); break; case ObjectType.Min: persistObj = new Min(); break; case ObjectType.Previous: persistObj = new Previous(); break; case ObjectType.RuntimeCells: persistObj = new RuntimeCells(); break; case ObjectType.RuntimeChartCriCell: persistObj = new RuntimeChartCriCell(); break; case ObjectType.RuntimeChartCriGroupLeafObj: persistObj = new RuntimeChartCriGroupLeafObj(); break; case ObjectType.RuntimeChartObj: persistObj = new RuntimeChartObj(); break; case ObjectType.RuntimeGaugePanelObj: persistObj = new RuntimeGaugePanelObj(); break; case ObjectType.RuntimeCriObj: persistObj = new RuntimeCriObj(); break; case ObjectType.RuntimeDataTablixGroupRootObj: persistObj = new RuntimeDataTablixGroupRootObj(); break; case ObjectType.RuntimeDataTablixMemberObj: persistObj = new RuntimeDataTablixMemberObj(); break; case ObjectType.RuntimeExpressionInfo: persistObj = new RuntimeExpressionInfo(); break; case ObjectType.RuntimeHierarchyObj: persistObj = new RuntimeHierarchyObj(); break; case ObjectType.RuntimeRICollection: persistObj = new RuntimeRICollection(); break; case ObjectType.RuntimeSortDataHolder: persistObj = new RuntimeSortDataHolder(); break; case ObjectType.RuntimeSortFilterEventInfo: persistObj = new RuntimeSortFilterEventInfo(); break; case ObjectType.RuntimeSortHierarchyObj: persistObj = new RuntimeSortHierarchyObj(); break; case ObjectType.RuntimeDataRowSortHierarchyObj: persistObj = new RuntimeDataRowSortHierarchyObj(); break; case ObjectType.RuntimeTablixCell: persistObj = new RuntimeTablixCell(); break; case ObjectType.RuntimeTablixGroupLeafObj: persistObj = new RuntimeTablixGroupLeafObj(); break; case ObjectType.RuntimeTablixObj: persistObj = new RuntimeTablixObj(); break; case ObjectType.RuntimeUserSortTargetInfo: persistObj = new RuntimeUserSortTargetInfo(); break; case ObjectType.ScopeLookupTable: persistObj = new ScopeLookupTable(); break; case ObjectType.SortExpressionScopeInstanceHolder: persistObj = new RuntimeSortFilterEventInfo.SortExpressionScopeInstanceHolder(); break; case ObjectType.SortFilterExpressionScopeObj: persistObj = new RuntimeSortFilterEventInfo.SortFilterExpressionScopeObj(); break; case ObjectType.SortHierarchyStruct: persistObj = new RuntimeSortHierarchyObj.SortHierarchyStructure(); break; case ObjectType.SortScopeValuesHolder: persistObj = new RuntimeSortFilterEventInfo.SortScopeValuesHolder(); break; case ObjectType.StDev: persistObj = new StDev(); break; case ObjectType.StDevP: persistObj = new StDevP(); break; case ObjectType.StorageItem: persistObj = new StorageItem(); break; case ObjectType.Sum: persistObj = new Sum(); break; case ObjectType.Var: persistObj = new Var(); break; case ObjectType.VarP: persistObj = new VarP(); break; case ObjectType.FilterKey: persistObj = new Filters.FilterKey(); break; case ObjectType.LookupMatches: persistObj = new LookupMatches(); break; case ObjectType.LookupMatchesWithRows: persistObj = new LookupMatchesWithRows(); break; case ObjectType.LookupTable: persistObj = new LookupTable(); break; case ObjectType.Union: persistObj = new Union(); break; case ObjectType.RuntimeMapDataRegionObj: persistObj = new RuntimeMapDataRegionObj(); break; case ObjectType.DataScopeInfo: persistObj = new DataScopeInfo(); break; case ObjectType.BucketedDataAggregateObjs: persistObj = new BucketedDataAggregateObjs(); break; case ObjectType.DataAggregateObjBucket: persistObj = new DataAggregateObjBucket(); break; case ObjectType.RuntimeGroupingObjHash: persistObj = new RuntimeGroupingObjHash(); break; case ObjectType.RuntimeGroupingObjTree: persistObj = new RuntimeGroupingObjTree(); break; case ObjectType.RuntimeGroupingObjDetail: persistObj = new RuntimeGroupingObjDetail(); break; case ObjectType.RuntimeGroupingObjDetailUserSort: persistObj = new RuntimeGroupingObjDetailUserSort(); break; case ObjectType.RuntimeGroupingObjLinkedList: persistObj = new RuntimeGroupingObjLinkedList(); break; case ObjectType.RuntimeGroupingObjNaturalGroup: persistObj = new RuntimeGroupingObjNaturalGroup(); break; default: persistObj = null; return(false); } return(true); }
private object EvaluateGroupExpression(RuntimeExpressionInfo expression, string propertyName) { Global.Tracer.Assert(m_hierarchyDef.Grouping != null, "(null != m_hierarchyDef.Grouping)"); return(m_odpContext.ReportRuntime.EvaluateRuntimeExpression(expression, Microsoft.ReportingServices.ReportProcessing.ObjectType.Grouping, m_hierarchyDef.Grouping.Name, propertyName)); }
protected RuntimeGroupRootObj(IReference <IScope> outerScope, Microsoft.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode hierarchyDef, DataActions dataAction, OnDemandProcessingContext odpContext, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType) : base(odpContext, objectType, outerScope.Value().Depth + 1) { m_hierarchyRoot = (RuntimeHierarchyObjReference)m_selfReference; m_outerScope = outerScope; m_hierarchyDef = hierarchyDef; Microsoft.ReportingServices.ReportIntermediateFormat.Grouping grouping = hierarchyDef.Grouping; Global.Tracer.Assert(grouping != null, "(null != groupDef)"); m_isDetailGroup = grouping.IsDetail; if (m_isDetailGroup) { m_expression = null; } else { m_expression = new RuntimeExpressionInfo(grouping.GroupExpressions, grouping.ExprHost, grouping.SortDirections, 0); } if (m_odpContext.RuntimeSortFilterInfo != null) { int count = m_odpContext.RuntimeSortFilterInfo.Count; using (outerScope.PinValue()) { IScope scope = outerScope.Value(); for (int i = 0; i < count; i++) { IReference <RuntimeSortFilterEventInfo> reference = m_odpContext.RuntimeSortFilterInfo[i]; using (reference.PinValue()) { RuntimeSortFilterEventInfo runtimeSortFilterEventInfo = reference.Value(); if (runtimeSortFilterEventInfo.EventSource.ContainingScopes != null && runtimeSortFilterEventInfo.EventSource.ContainingScopes.Count != 0 && !runtimeSortFilterEventInfo.HasEventSourceScope && (!m_isDetailGroup || !runtimeSortFilterEventInfo.EventSource.IsSubReportTopLevelScope)) { continue; } bool flag = false; if (m_isDetailGroup) { if (!scope.TargetForNonDetailSort && IsTargetForSort(i, detailSort: true) && runtimeSortFilterEventInfo.EventTarget != base.SelfReference && scope.TargetScopeMatched(i, detailSort: true)) { flag = true; if (m_detailUserSortTargetInfo == null) { m_detailUserSortTargetInfo = new RuntimeUserSortTargetInfo((IReference <IHierarchyObj>)base.SelfReference, i, reference); } else { m_detailUserSortTargetInfo.AddSortInfo((IReference <IHierarchyObj>)base.SelfReference, i, reference); } } } else if (grouping.IsSortFilterExpressionScope != null) { flag = (grouping.IsSortFilterExpressionScope[i] && m_odpContext.UserSortFilterContext.InProcessUserSortPhase(i) && TargetScopeMatched(i, detailSort: false)); } if (flag) { if (m_builtinSortOverridden == null) { m_builtinSortOverridden = new bool[count]; } m_builtinSortOverridden[i] = true; } } } } } if (m_detailUserSortTargetInfo != null) { m_groupingType = RuntimeGroupingObj.GroupingTypes.DetailUserSort; } else if (grouping.GroupAndSort && !BuiltinSortOverridden) { m_groupingType = RuntimeGroupingObj.GroupingTypes.Sort; } else if (grouping.IsDetail && grouping.Parent == null && !BuiltinSortOverridden) { m_groupingType = RuntimeGroupingObj.GroupingTypes.Detail; } else if (grouping.NaturalGroup) { m_groupingType = RuntimeGroupingObj.GroupingTypes.NaturalGroup; } else { m_groupingType = RuntimeGroupingObj.GroupingTypes.Hash; } m_grouping = RuntimeGroupingObj.CreateGroupingObj(m_groupingType, this, objectType); if (grouping.Filters == null) { m_dataAction = dataAction; m_outerDataAction = dataAction; } if (grouping.RecursiveAggregates != null) { m_dataAction |= DataActions.RecursiveAggregates; } if (grouping.PostSortAggregates != null) { m_dataAction |= DataActions.PostSortAggregates; } if (grouping.Parent != null) { m_parentExpression = new RuntimeExpressionInfo(grouping.Parent, grouping.ParentExprHost, null, 0); } }
public override void Deserialize(IntermediateFormatReader reader) { base.Deserialize(reader); IScalabilityCache scalabilityCache = reader.PersistenceHelper as IScalabilityCache; reader.RegisterDeclaration(m_declaration); while (reader.NextMember()) { switch (reader.CurrentMember.MemberName) { case MemberName.HierarchyDef: { int id2 = reader.ReadInt32(); m_hierarchyDef = (Microsoft.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode)scalabilityCache.FetchStaticReference(id2); break; } case MemberName.OuterScope: m_outerScope = (IReference <IScope>)reader.ReadRIFObject(); break; case MemberName.ProcessingStage: m_processingStage = (ProcessingStages)reader.ReadEnum(); break; case MemberName.ScopedRunningValues: m_scopedRunningValues = reader.ReadListOfPrimitives <string>(); break; case MemberName.RunningValuesInGroup: m_runningValuesInGroup = reader.ReadListOfPrimitives <string>(); break; case MemberName.PreviousValuesInGroup: m_previousValuesInGroup = reader.ReadListOfPrimitives <string>(); break; case MemberName.GroupCollection: m_groupCollection = reader.ReadStringRIFObjectDictionary <IReference <RuntimeGroupRootObj> >(); break; case MemberName.DataAction: m_dataAction = (DataActions)reader.ReadEnum(); break; case MemberName.OuterDataAction: m_outerDataAction = (DataActions)reader.ReadEnum(); break; case MemberName.GroupingType: m_groupingType = (RuntimeGroupingObj.GroupingTypes)reader.ReadEnum(); break; case MemberName.Filters: { int id = reader.ReadInt32(); m_groupFilters = (Filters)scalabilityCache.FetchStaticReference(id); break; } case MemberName.ParentExpression: m_parentExpression = (RuntimeExpressionInfo)reader.ReadRIFObject(); break; case MemberName.CurrentGroupExprValue: m_currentGroupExprValue = reader.ReadVariant(); break; case MemberName.SaveGroupExprValues: m_saveGroupExprValues = reader.ReadBoolean(); break; case MemberName.SortFilterExpressionScopeInfoIndices: m_sortFilterExpressionScopeInfoIndices = reader.ReadInt32Array(); break; case MemberName.BuiltinSortOverridden: m_builtinSortOverridden = reader.ReadBooleanArray(); break; case MemberName.IsDetailGroup: m_isDetailGroup = reader.ReadBoolean(); break; case MemberName.DetailUserSortTargetInfo: m_detailUserSortTargetInfo = (RuntimeUserSortTargetInfo)reader.ReadRIFObject(); break; case MemberName.DetailRows: m_detailDataRows = reader.ReadRIFObject <ScalableList <DataFieldRow> >(); break; default: Global.Tracer.Assert(condition: false); break; } } }