public void PostFilterNextRow() { if (this.m_nonCustomAggregates != null) { for (int i = 0; i < this.m_nonCustomAggregates.Count; i++) { this.m_nonCustomAggregates[i].Update(); } } if (this.m_dataRows != null) { RuntimeDataTablixObj.SaveData(this.m_dataRows, this.m_odpContext); } if (this.m_firstNonAggregateRow) { this.m_firstNonAggregateRow = false; this.m_dataSetInstance.FirstRowOffset = this.m_odpContext.ReportObjectModel.FieldsImpl.StreamOffset; } if (this.m_lookupProcessor != null) { this.m_lookupProcessor.NextRow(); } else { this.PostLookupNextRow(); } }
protected void CommonNextRow(ScalableList <DataFieldRow> dataRows) { if (dataRows != null) { RuntimeDataTablixObj.SaveData(dataRows, this.m_odpContext); } this.SendToInner(); }
public void NextRow() { long streamOffset = this.m_odpContext.ReportObjectModel.FieldsImpl.StreamOffset; int num = -1; CommonRowCache tablixProcessingLookupRowCache = this.m_odpContext.TablixProcessingLookupRowCache; if (this.m_mustBufferAllRows) { num = tablixProcessingLookupRowCache.AddRow(RuntimeDataTablixObj.SaveData(this.m_odpContext)); if (this.m_firstRowCacheIndex == -1) { this.m_firstRowCacheIndex = num; } } IScalabilityCache tablixProcessingScalabilityCache = this.m_odpContext.TablixProcessingScalabilityCache; for (int i = 0; i < this.m_dataSet.LookupDestinationInfos.Count; i++) { LookupDestinationInfo lookupDestinationInfo = this.m_dataSet.LookupDestinationInfos[i]; LookupObjResult lookupObjResult = this.m_dataSetInstance.LookupResults[i]; if (!lookupObjResult.ErrorOccured) { AspNetCore.ReportingServices.RdlExpressions.VariantResult variantResult = lookupDestinationInfo.EvaluateDestExpr(this.m_odpContext, lookupObjResult); if (variantResult.ErrorOccurred) { lookupObjResult.DataFieldStatus = variantResult.FieldStatus; } else { object value = variantResult.Value; LookupTable lookupTable = lookupObjResult.GetLookupTable(this.m_odpContext); try { LookupMatches lookupMatches = default(LookupMatches); IDisposable disposable = default(IDisposable); if (!lookupTable.TryGetAndPinValue(value, out lookupMatches, out disposable)) { lookupMatches = ((!lookupDestinationInfo.UsedInSameDataSetTablixProcessing) ? new LookupMatches() : new LookupMatchesWithRows()); disposable = lookupTable.AddAndPin(value, lookupMatches); } if (lookupDestinationInfo.IsMultiValue || !lookupMatches.HasRow) { lookupMatches.AddRow(streamOffset, num, tablixProcessingScalabilityCache); } disposable.Dispose(); } catch (ReportProcessingException_SpatialTypeComparisonError reportProcessingException_SpatialTypeComparisonError) { throw new ReportProcessingException(this.m_lookupOwner.RegisterSpatialElementComparisonError(reportProcessingException_SpatialTypeComparisonError.Type)); } } } } if (!this.m_mustBufferAllRows) { this.m_lookupOwner.PostLookupNextRow(); } }
private void AddDataRegion(RuntimeDataTablixObj dataRegion, AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef) { RuntimeDataTablixObjReference runtimeDataTablixObjReference = (RuntimeDataTablixObjReference)dataRegion.SelfReference; runtimeDataTablixObjReference.UnPinValue(); int indexInCollection = dataRegionDef.IndexInCollection; ListUtils.AdjustLength(this.m_dataRegionObjs, indexInCollection); this.m_dataRegionObjs[indexInCollection] = runtimeDataTablixObjReference; }
private void CreateMapDataRegions(IReference <IScope> owner, List <MapDataRegion> mapDataRegions, OnDemandProcessingContext odpContext, bool onePass, ref DataActions dataAction) { RuntimeDataTablixObj runtimeDataTablixObj = null; foreach (MapDataRegion mapDataRegion in mapDataRegions) { runtimeDataTablixObj = new RuntimeMapDataRegionObj(owner, mapDataRegion, ref dataAction, odpContext, onePass); this.AddDataRegion(runtimeDataTablixObj, mapDataRegion); } }
private void CreateDataRegions(IReference <IScope> owner, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem reportItem, OnDemandProcessingContext odpContext, bool onePass, ref DataActions dataAction) { RuntimeDataTablixObj runtimeDataTablixObj = null; switch (reportItem.ObjectType) { case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Rectangle: { AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItemCollection reportItems = ((AspNetCore.ReportingServices.ReportIntermediateFormat.Rectangle)reportItem).ReportItems; if (reportItems != null && reportItems.ComputedReportItems != null) { this.CreateDataRegions(owner, reportItems.ComputedReportItems, odpContext, onePass, ref dataAction); } break; } case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Tablix: runtimeDataTablixObj = new RuntimeTablixObj(owner, (AspNetCore.ReportingServices.ReportIntermediateFormat.Tablix)reportItem, ref dataAction, odpContext, onePass); break; case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Chart: runtimeDataTablixObj = new RuntimeChartObj(owner, (AspNetCore.ReportingServices.ReportIntermediateFormat.Chart)reportItem, ref dataAction, odpContext, onePass); break; case AspNetCore.ReportingServices.ReportProcessing.ObjectType.GaugePanel: runtimeDataTablixObj = new RuntimeGaugePanelObj(owner, (GaugePanel)reportItem, ref dataAction, odpContext, onePass); break; case AspNetCore.ReportingServices.ReportProcessing.ObjectType.MapDataRegion: runtimeDataTablixObj = new RuntimeMapDataRegionObj(owner, (MapDataRegion)reportItem, ref dataAction, odpContext, onePass); break; case AspNetCore.ReportingServices.ReportProcessing.ObjectType.CustomReportItem: if (reportItem.IsDataRegion) { runtimeDataTablixObj = new RuntimeCriObj(owner, (AspNetCore.ReportingServices.ReportIntermediateFormat.CustomReportItem)reportItem, ref dataAction, odpContext, onePass); } break; case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Map: { List <MapDataRegion> mapDataRegions = ((Map)reportItem).MapDataRegions; if (mapDataRegions != null) { this.CreateMapDataRegions(owner, mapDataRegions, odpContext, onePass, ref dataAction); } break; } } if (runtimeDataTablixObj != null) { this.AddDataRegion(runtimeDataTablixObj, (AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion)reportItem); } }
public void UpdateAggregatesForRow() { Global.Tracer.Assert(this.m_aggsForUpdateAtRowScope != null || this.m_runningValuesForUpdateAtRow != null, "UpdateAggregatesForRow must be driven by a call to UpdateAggregates."); if (this.m_aggsForUpdateAtRowScope != null) { foreach (AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj item in this.m_aggsForUpdateAtRowScope) { item.Update(); } } if (this.m_runningValuesForUpdateAtRow != null) { RuntimeDataTablixObj.UpdateRunningValues(this.m_odpContext, this.m_runningValuesForUpdateAtRow); } }
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; } } }
public override void ReadRow(DataActions dataAction, ITraversalContext context) { if (DataActions.UserSort == dataAction) { RuntimeDataRegionObj.CommonFirstRow(base.m_odpContext, ref base.m_firstRowIsAggregate, ref base.m_firstRow); base.CommonNextRow(base.m_dataRows); } else if (DataActions.AggregatesOfAggregates == dataAction) { AggregateUpdateContext aggregateUpdateContext = (AggregateUpdateContext)context; aggregateUpdateContext.UpdateAggregatesForRow(); } else { if (FlagUtils.HasFlag(dataAction, DataActions.PostSortAggregatesOfAggregates)) { AggregateUpdateContext aggregateUpdateContext2 = (AggregateUpdateContext)context; aggregateUpdateContext2.UpdateAggregatesForRow(); } if (!base.m_dataRegionDef.ProcessCellRunningValues) { if (FlagUtils.HasFlag(dataAction, DataActions.PostSortAggregates)) { if (base.m_postSortAggregates != null) { RuntimeDataRegionObj.UpdateAggregates(base.m_odpContext, base.m_postSortAggregates, false); } if (base.m_runningValues != null) { RuntimeDataTablixObj.UpdateRunningValues(base.m_odpContext, base.m_runningValues); } } if (base.m_outerScope != null && (dataAction & base.m_outerDataAction) != 0) { using (base.m_outerScope.PinValue()) { IScope scope = base.m_outerScope.Value(); scope.ReadRow(dataAction, context); } } } } }
public static void SaveData(ScalableList <DataFieldRow> dataRows, OnDemandProcessingContext odpContext) { Global.Tracer.Assert(null != dataRows, "(null != dataRows)"); dataRows.Add(RuntimeDataTablixObj.SaveData(odpContext)); }
public override void CalculateRunningValues(Dictionary <string, IReference <RuntimeGroupRootObj> > groupCol, IReference <RuntimeGroupRootObj> lastGroup, AggregateUpdateContext aggContext) { if (base.m_dataRegionDef.RunningValues != null && base.m_runningValues == null && base.m_previousValues == null) { RuntimeDataTablixObj.AddRunningValues(base.m_odpContext, base.m_dataRegionDef.RunningValues, ref base.m_runningValues, ref base.m_previousValues, groupCol, lastGroup); } if (base.m_dataRegionDef.DataScopeInfo != null) { List <string> list = null; List <string> list2 = null; RuntimeDataTablixObj.AddRunningValues(base.m_odpContext, base.m_dataRegionDef.DataScopeInfo.RunningValuesOfAggregates, ref list, ref list2, groupCol, lastGroup); } bool flag = base.m_dataRows != null && FlagUtils.HasFlag(base.m_dataAction, DataActions.PostSortAggregates); AggregateUpdateQueue workQueue = RuntimeDataRegionObj.AggregateOfAggregatesStart(aggContext, this, base.m_dataRegionDef.DataScopeInfo, base.m_postSortAggregatesOfAggregates, (AggregateUpdateFlags)(flag ? 1 : 3), true); if (flag) { DataActions dataActions = DataActions.PostSortAggregates; if (aggContext.LastScopeNeedsRowAggregateProcessing()) { dataActions |= DataActions.PostSortAggregatesOfAggregates; } base.ReadRows(dataActions, aggContext); base.m_dataRows = null; } int num = (this.m_outerGroupings != null) ? this.m_outerGroupings.Length : 0; if (num == 0) { if (this.m_innerGroupings != null) { for (int i = 0; i < this.m_innerGroupings.Length; i++) { IReference <RuntimeMemberObj> reference = this.m_innerGroupings[i]; using (reference.PinValue()) { reference.Value().CalculateRunningValues(groupCol, lastGroup, aggContext); } } } } else { for (int j = 0; j < num; j++) { IReference <RuntimeMemberObj> reference2 = this.m_outerGroupings[j]; bool flag2 = default(bool); using (reference2.PinValue()) { RuntimeMemberObj runtimeMemberObj = reference2.Value(); runtimeMemberObj.CalculateRunningValues(groupCol, lastGroup, aggContext); flag2 = ((BaseReference)runtimeMemberObj.GroupRoot == (object)null); } if (flag2 && this.m_innerGroupings != null) { for (int k = 0; k < this.m_innerGroupings.Length; k++) { IReference <RuntimeMemberObj> reference3 = this.m_innerGroupings[k]; using (reference3.PinValue()) { RuntimeMemberObj runtimeMemberObj2 = reference3.Value(); runtimeMemberObj2.PrepareCalculateRunningValues(); runtimeMemberObj2.CalculateRunningValues(groupCol, lastGroup, aggContext); } } } } } this.CalculateRunningValuesForTopLevelStaticContents(groupCol, lastGroup, aggContext); RuntimeDataRegionObj.AggregatesOfAggregatesEnd(this, aggContext, workQueue, base.m_dataRegionDef.DataScopeInfo, base.m_postSortAggregatesOfAggregates, true); this.CalculateDRPreviousAggregates(); RuntimeRICollection.StoreRunningValues(base.m_odpContext.ReportObjectModel.AggregatesImpl, base.m_dataRegionDef.RunningValues, ref base.m_runningValueValues); if (base.m_dataRegionDef.DataScopeInfo != null) { RuntimeRICollection.StoreRunningValues(base.m_odpContext.ReportObjectModel.AggregatesImpl, base.m_dataRegionDef.DataScopeInfo.RunningValuesOfAggregates, ref base.m_runningValueOfAggregateValues); } }
public bool UpdateAggregates(DataScopeInfo scopeInfo, IDataRowHolder scopeInst, AggregateUpdateFlags updateFlags, bool needsSetupEnvironment) { this.m_aggsForUpdateAtRowScope = null; this.m_runningValuesForUpdateAtRow = null; if (this.m_activeAggregates == null) { return(false); } for (AggregateUpdateCollection aggregateUpdateCollection = this.m_activeAggregates; aggregateUpdateCollection != null; aggregateUpdateCollection = aggregateUpdateCollection.LinkedCollection) { List <AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj> list = default(List <AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj>); if (aggregateUpdateCollection.GetAggregatesForScope(scopeInfo.ScopeID, out list)) { if (needsSetupEnvironment) { scopeInst.SetupEnvironment(); needsSetupEnvironment = false; } foreach (AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj item in list) { item.Update(); } } if (aggregateUpdateCollection.GetAggregatesForRowScope(scopeInfo.ScopeID, out list)) { if (this.m_aggsForUpdateAtRowScope == null) { this.m_aggsForUpdateAtRowScope = new List <AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj>(); } this.m_aggsForUpdateAtRowScope.AddRange(list); } List <string> list2 = default(List <string>); if (aggregateUpdateCollection.GetRunningValuesForScope(scopeInfo.ScopeID, out list2)) { if (needsSetupEnvironment) { scopeInst.SetupEnvironment(); needsSetupEnvironment = false; } RuntimeDataTablixObj.UpdateRunningValues(this.m_odpContext, list2); } if (aggregateUpdateCollection.GetRunningValuesForRowScope(scopeInfo.ScopeID, out list2)) { if (this.m_runningValuesForUpdateAtRow == null) { this.m_runningValuesForUpdateAtRow = new List <string>(); } this.m_runningValuesForUpdateAtRow.AddRange(list2); } } if (this.m_aggsForUpdateAtRowScope != null || this.m_runningValuesForUpdateAtRow != null) { if (needsSetupEnvironment) { scopeInst.SetupEnvironment(); } if (FlagUtils.HasFlag(updateFlags, AggregateUpdateFlags.RowAggregates)) { scopeInst.ReadRows(DataActions.AggregatesOfAggregates, this); } } return(scopeInfo.ScopeID != this.m_activeAggregates.InnermostUpdateScopeID); }