protected Hashtable GetScopeNames(RuntimeDataRegionObjReference currentScope, Dictionary <string, object> nameValuePairs) { Hashtable hashtable = new Hashtable(); IScope scope = null; for (IReference <IScope> reference = currentScope; reference != null; reference = scope.GetOuterScope(false)) { scope = reference.Value(); string scopeName = scope.GetScopeName(); if (scopeName != null) { AspNetCore.ReportingServices.ReportIntermediateFormat.Grouping grouping = null; if (scope is RuntimeGroupLeafObj) { grouping = ((RuntimeGroupLeafObj)scope).GroupingDef; RuntimeDataRegionObj.AddGroupNameValuePair(this.m_odpContext, grouping, nameValuePairs); } hashtable.Add(scopeName, grouping); } else if (scope is RuntimeTablixCell) { scope.GetGroupNameValuePairs(nameValuePairs); } } return(hashtable); }
protected Hashtable GetScopeNames(RuntimeDataRegionObjReference currentScope, string targetScope, out bool inScope) { inScope = false; Hashtable hashtable = new Hashtable(); IScope scope = null; for (IReference <IScope> reference = currentScope; reference != null; reference = scope.GetOuterScope(false)) { scope = reference.Value(); string scopeName = scope.GetScopeName(); if (scopeName != null) { if (!inScope && scopeName.Equals(targetScope)) { inScope = true; } AspNetCore.ReportingServices.ReportIntermediateFormat.Grouping value = null; if (scope is RuntimeGroupLeafObj) { value = ((RuntimeGroupLeafObj)scope).GroupingDef; } hashtable.Add(scopeName, value); } else if (scope is RuntimeTablixCell && !inScope) { inScope = scope.InScope(targetScope); } } return(hashtable); }
protected Hashtable GetScopeNames(RuntimeDataRegionObjReference currentScope, string targetScope, out int level) { level = -1; Hashtable hashtable = new Hashtable(); IScope scope = null; for (IReference <IScope> reference = currentScope; reference != null; reference = scope.GetOuterScope(false)) { scope = reference.Value(); string scopeName = scope.GetScopeName(); if (scopeName != null) { AspNetCore.ReportingServices.ReportIntermediateFormat.Grouping grouping = null; if (scope is RuntimeGroupLeafObj) { grouping = ((RuntimeGroupLeafObj)scope).GroupingDef; if (-1 == level && scopeName.Equals(targetScope)) { level = grouping.RecursiveLevel; } } hashtable.Add(scopeName, grouping); } else if (scope is RuntimeTablixCell && -1 == level) { level = scope.RecursiveLevel(targetScope); } } return(hashtable); }
private void Traverse(ProcessingStages operation, AggregateUpdateContext context) { for (int i = 0; i < this.m_dataRegionObjs.Count; i++) { RuntimeDataRegionObjReference runtimeDataRegionObjReference = this.m_dataRegionObjs[i]; if ((BaseReference)runtimeDataRegionObjReference != (object)null) { using (runtimeDataRegionObjReference.PinValue()) { switch (operation) { case ProcessingStages.SortAndFilter: runtimeDataRegionObjReference.Value().SortAndFilter(context); break; case ProcessingStages.UpdateAggregates: runtimeDataRegionObjReference.Value().UpdateAggregates(context); break; default: Global.Tracer.Assert(false, "Unknown ProcessingStage in Traverse"); break; } } } } }
public void CalculateRunningValues(Dictionary <string, IReference <RuntimeGroupRootObj> > groupCollection, IReference <RuntimeGroupRootObj> lastGroup, AggregateUpdateContext aggContext) { for (int i = 0; i < this.m_dataRegionObjs.Count; i++) { RuntimeDataRegionObjReference runtimeDataRegionObjReference = this.m_dataRegionObjs[i]; if ((BaseReference)runtimeDataRegionObjReference != (object)null) { using (runtimeDataRegionObjReference.PinValue()) { runtimeDataRegionObjReference.Value().CalculateRunningValues(groupCollection, lastGroup, aggContext); } } } }
public void FirstPassNextDataRow(OnDemandProcessingContext odpContext) { AggregateRowInfo aggregateRowInfo = AggregateRowInfo.CreateAndSaveAggregateInfo(odpContext); for (int i = 0; i < this.m_dataRegionObjs.Count; i++) { RuntimeDataRegionObjReference runtimeDataRegionObjReference = this.m_dataRegionObjs[i]; if ((BaseReference)runtimeDataRegionObjReference != (object)null) { using (runtimeDataRegionObjReference.PinValue()) { runtimeDataRegionObjReference.Value().NextRow(); } aggregateRowInfo.RestoreAggregateInfo(odpContext); } } }
private void CreateInstance(ScopeInstance parentInstance, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem reportItem, OnDemandProcessingContext odpContext, IReference <IScope> owner) { if (reportItem != null) { if (reportItem.IsDataRegion) { AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegion = (AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion)reportItem; RuntimeDataRegionObjReference dataRegionObjRef = this.m_dataRegionObjs[dataRegion.IndexInCollection]; RuntimeRICollection.CreateDataRegionInstance(parentInstance, odpContext, dataRegionObjRef); } else { switch (reportItem.ObjectType) { case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Subreport: this.CreateSubReportInstance((AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport)reportItem, parentInstance, odpContext, owner); break; case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Rectangle: { AspNetCore.ReportingServices.ReportIntermediateFormat.Rectangle rectangle = (AspNetCore.ReportingServices.ReportIntermediateFormat.Rectangle)reportItem; this.CreateInstances(parentInstance, odpContext, owner, rectangle.ReportItems.ComputedReportItems); break; } case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Map: { Map map = (Map)reportItem; List <MapDataRegion> mapDataRegions = map.MapDataRegions; for (int i = 0; i < mapDataRegions.Count; i++) { this.CreateInstance(parentInstance, mapDataRegions[i], odpContext, owner); } break; } } } } }
private void CreateInstance(ScopeInstance parentInstance, Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem reportItem, OnDemandProcessingContext odpContext, IReference <IScope> owner) { if (reportItem == null) { return; } if (reportItem.IsDataRegion) { Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion dataRegion = (Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion)reportItem; RuntimeDataRegionObjReference dataRegionObjRef = m_dataRegionObjs[dataRegion.IndexInCollection]; CreateDataRegionInstance(parentInstance, odpContext, dataRegionObjRef); return; } switch (reportItem.ObjectType) { case Microsoft.ReportingServices.ReportProcessing.ObjectType.Subreport: CreateSubReportInstance((Microsoft.ReportingServices.ReportIntermediateFormat.SubReport)reportItem, parentInstance, odpContext, owner); break; case Microsoft.ReportingServices.ReportProcessing.ObjectType.Rectangle: { Microsoft.ReportingServices.ReportIntermediateFormat.Rectangle rectangle = (Microsoft.ReportingServices.ReportIntermediateFormat.Rectangle)reportItem; CreateInstances(parentInstance, odpContext, owner, rectangle.ReportItems.ComputedReportItems); break; } case Microsoft.ReportingServices.ReportProcessing.ObjectType.Map: { List <MapDataRegion> mapDataRegions = ((Map)reportItem).MapDataRegions; for (int i = 0; i < mapDataRegions.Count; i++) { CreateInstance(parentInstance, mapDataRegions[i], odpContext, owner); } break; } } }
public virtual void SetReference(IReference selfRef) { this.m_selfReference = (RuntimeDataRegionObjReference)selfRef; }
private static void CreateDataRegionInstance(ScopeInstance parentInstance, OnDemandProcessingContext odpContext, RuntimeDataRegionObjReference dataRegionObjRef) { if (!((BaseReference)dataRegionObjRef == (object)null)) { using (dataRegionObjRef.PinValue()) { RuntimeDataTablixObj runtimeDataTablixObj = (RuntimeDataTablixObj)dataRegionObjRef.Value(); AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef = runtimeDataTablixObj.DataRegionDef; runtimeDataTablixObj.SetupEnvironment(); IReference <DataRegionInstance> reference = DataRegionInstance.CreateInstance(parentInstance, odpContext.OdpMetadata, dataRegionDef, odpContext.CurrentDataSetIndex); DataRegionInstance dataRegionInstance = reference.Value(); runtimeDataTablixObj.CreateInstances(dataRegionInstance); dataRegionInstance.InstanceComplete(); dataRegionDef.RuntimeDataRegionObj = null; } } }
private static void CreateDataRegionInstance(ScopeInstance parentInstance, OnDemandProcessingContext odpContext, RuntimeDataRegionObjReference dataRegionObjRef) { if (!(dataRegionObjRef == null)) { using (dataRegionObjRef.PinValue()) { RuntimeDataTablixObj obj = (RuntimeDataTablixObj)dataRegionObjRef.Value(); Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef = obj.DataRegionDef; obj.SetupEnvironment(); DataRegionInstance dataRegionInstance = DataRegionInstance.CreateInstance(parentInstance, odpContext.OdpMetadata, dataRegionDef, odpContext.CurrentDataSetIndex).Value(); obj.CreateInstances(dataRegionInstance); dataRegionInstance.InstanceComplete(); dataRegionDef.RuntimeDataRegionObj = null; } } }