public void PostFilterNextRow() { if (m_nonCustomAggregates != null) { for (int i = 0; i < m_nonCustomAggregates.Count; i++) { m_nonCustomAggregates[i].Update(); } } if (m_dataRows != null) { RuntimeDataTablixObj.SaveData(m_dataRows, m_odpContext); } if (m_firstNonAggregateRow) { m_firstNonAggregateRow = false; m_dataSetInstance.FirstRowOffset = m_odpContext.ReportObjectModel.FieldsImpl.StreamOffset; } if (m_lookupProcessor != null) { m_lookupProcessor.NextRow(); } else { PostLookupNextRow(); } }
protected void CommonNextRow(ScalableList <DataFieldRow> dataRows) { if (dataRows != null) { RuntimeDataTablixObj.SaveData(dataRows, m_odpContext); } SendToInner(); }
private void AddDataRegion(RuntimeDataTablixObj dataRegion, Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef) { RuntimeDataTablixObjReference runtimeDataTablixObjReference = (RuntimeDataTablixObjReference)dataRegion.SelfReference; runtimeDataTablixObjReference.UnPinValue(); int indexInCollection = dataRegionDef.IndexInCollection; ListUtils.AdjustLength(m_dataRegionObjs, indexInCollection); 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); AddDataRegion(runtimeDataTablixObj, mapDataRegion); } }
internal void NextRow() { long streamOffset = m_odpContext.ReportObjectModel.FieldsImpl.StreamOffset; int num = -1; CommonRowCache tablixProcessingLookupRowCache = m_odpContext.TablixProcessingLookupRowCache; if (m_mustBufferAllRows) { num = tablixProcessingLookupRowCache.AddRow(RuntimeDataTablixObj.SaveData(m_odpContext)); if (m_firstRowCacheIndex == -1) { m_firstRowCacheIndex = num; } } IScalabilityCache tablixProcessingScalabilityCache = m_odpContext.TablixProcessingScalabilityCache; for (int i = 0; i < m_dataSet.LookupDestinationInfos.Count; i++) { LookupDestinationInfo lookupDestinationInfo = m_dataSet.LookupDestinationInfos[i]; LookupObjResult lookupObjResult = m_dataSetInstance.LookupResults[i]; if (lookupObjResult.ErrorOccured) { continue; } Microsoft.ReportingServices.RdlExpressions.VariantResult variantResult = lookupDestinationInfo.EvaluateDestExpr(m_odpContext, lookupObjResult); if (variantResult.ErrorOccurred) { lookupObjResult.DataFieldStatus = variantResult.FieldStatus; continue; } object value = variantResult.Value; LookupTable lookupTable = lookupObjResult.GetLookupTable(m_odpContext); try { if (!lookupTable.TryGetAndPinValue(value, out LookupMatches matches, out IDisposable cleanupRef)) { matches = ((!lookupDestinationInfo.UsedInSameDataSetTablixProcessing) ? new LookupMatches() : new LookupMatchesWithRows()); cleanupRef = lookupTable.AddAndPin(value, matches); } if (lookupDestinationInfo.IsMultiValue || !matches.HasRow) { matches.AddRow(streamOffset, num, tablixProcessingScalabilityCache); } cleanupRef.Dispose(); } catch (ReportProcessingException_SpatialTypeComparisonError reportProcessingException_SpatialTypeComparisonError) { throw new ReportProcessingException(m_lookupOwner.RegisterSpatialElementComparisonError(reportProcessingException_SpatialTypeComparisonError.Type)); } } if (!m_mustBufferAllRows) { m_lookupOwner.PostLookupNextRow(); } }
private void CreateDataRegions(IReference <IScope> owner, Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem reportItem, OnDemandProcessingContext odpContext, bool onePass, ref DataActions dataAction) { RuntimeDataTablixObj runtimeDataTablixObj = null; switch (reportItem.ObjectType) { case Microsoft.ReportingServices.ReportProcessing.ObjectType.Rectangle: { Microsoft.ReportingServices.ReportIntermediateFormat.ReportItemCollection reportItems = ((Microsoft.ReportingServices.ReportIntermediateFormat.Rectangle)reportItem).ReportItems; if (reportItems != null && reportItems.ComputedReportItems != null) { CreateDataRegions(owner, reportItems.ComputedReportItems, odpContext, onePass, ref dataAction); } break; } case Microsoft.ReportingServices.ReportProcessing.ObjectType.Tablix: runtimeDataTablixObj = new RuntimeTablixObj(owner, (Microsoft.ReportingServices.ReportIntermediateFormat.Tablix)reportItem, ref dataAction, odpContext, onePass); break; case Microsoft.ReportingServices.ReportProcessing.ObjectType.Chart: runtimeDataTablixObj = new RuntimeChartObj(owner, (Microsoft.ReportingServices.ReportIntermediateFormat.Chart)reportItem, ref dataAction, odpContext, onePass); break; case Microsoft.ReportingServices.ReportProcessing.ObjectType.GaugePanel: runtimeDataTablixObj = new RuntimeGaugePanelObj(owner, (GaugePanel)reportItem, ref dataAction, odpContext, onePass); break; case Microsoft.ReportingServices.ReportProcessing.ObjectType.MapDataRegion: runtimeDataTablixObj = new RuntimeMapDataRegionObj(owner, (MapDataRegion)reportItem, ref dataAction, odpContext, onePass); break; case Microsoft.ReportingServices.ReportProcessing.ObjectType.CustomReportItem: if (reportItem.IsDataRegion) { runtimeDataTablixObj = new RuntimeCriObj(owner, (Microsoft.ReportingServices.ReportIntermediateFormat.CustomReportItem)reportItem, ref dataAction, odpContext, onePass); } break; case Microsoft.ReportingServices.ReportProcessing.ObjectType.Map: { List <MapDataRegion> mapDataRegions = ((Map)reportItem).MapDataRegions; if (mapDataRegions != null) { CreateMapDataRegions(owner, mapDataRegions, odpContext, onePass, ref dataAction); } break; } } if (runtimeDataTablixObj != null) { AddDataRegion(runtimeDataTablixObj, (Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion)reportItem); } }
public void UpdateAggregatesForRow() { Global.Tracer.Assert(m_aggsForUpdateAtRowScope != null || m_runningValuesForUpdateAtRow != null, "UpdateAggregatesForRow must be driven by a call to UpdateAggregates."); if (m_aggsForUpdateAtRowScope != null) { foreach (Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj item in m_aggsForUpdateAtRowScope) { item.Update(); } } if (m_runningValuesForUpdateAtRow != null) { RuntimeDataTablixObj.UpdateRunningValues(m_odpContext, m_runningValuesForUpdateAtRow); } }
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; } } }
public bool UpdateAggregates(DataScopeInfo scopeInfo, IDataRowHolder scopeInst, AggregateUpdateFlags updateFlags, bool needsSetupEnvironment) { m_aggsForUpdateAtRowScope = null; m_runningValuesForUpdateAtRow = null; if (m_activeAggregates == null) { return(false); } for (AggregateUpdateCollection aggregateUpdateCollection = m_activeAggregates; aggregateUpdateCollection != null; aggregateUpdateCollection = aggregateUpdateCollection.LinkedCollection) { if (aggregateUpdateCollection.GetAggregatesForScope(scopeInfo.ScopeID, out List <Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj> aggs)) { if (needsSetupEnvironment) { scopeInst.SetupEnvironment(); needsSetupEnvironment = false; } foreach (Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj item in aggs) { item.Update(); } } if (aggregateUpdateCollection.GetAggregatesForRowScope(scopeInfo.ScopeID, out aggs)) { if (m_aggsForUpdateAtRowScope == null) { m_aggsForUpdateAtRowScope = new List <Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj>(); } m_aggsForUpdateAtRowScope.AddRange(aggs); } if (aggregateUpdateCollection.GetRunningValuesForScope(scopeInfo.ScopeID, out List <string> aggs2)) { if (needsSetupEnvironment) { scopeInst.SetupEnvironment(); needsSetupEnvironment = false; } RuntimeDataTablixObj.UpdateRunningValues(m_odpContext, aggs2); } if (aggregateUpdateCollection.GetRunningValuesForRowScope(scopeInfo.ScopeID, out aggs2)) { if (m_runningValuesForUpdateAtRow == null) { m_runningValuesForUpdateAtRow = new List <string>(); } m_runningValuesForUpdateAtRow.AddRange(aggs2); } } if (m_aggsForUpdateAtRowScope != null || m_runningValuesForUpdateAtRow != null) { if (needsSetupEnvironment) { scopeInst.SetupEnvironment(); } if (FlagUtils.HasFlag(updateFlags, AggregateUpdateFlags.RowAggregates)) { scopeInst.ReadRows(DataActions.AggregatesOfAggregates, this); } } return(scopeInfo.ScopeID != m_activeAggregates.InnermostUpdateScopeID); }