public override void EvaluateScopedFieldReference(string scopeName, int fieldIndex, ref AspNetCore.ReportingServices.RdlExpressions.VariantResult result) { Global.Tracer.Assert(this.m_lastRIFObject != null, "The RIF object for the current scope should be present."); try { AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet targetDataSet = default(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet); if (!base.m_odpContext.ReportDefinition.MappingNameToDataSet.TryGetValue(scopeName, out targetDataSet)) { throw new ReportProcessingException_NonExistingScopeReference(scopeName); } NonStructuralIdcDataManager nonStructuralIdcDataManager = default(NonStructuralIdcDataManager); if (!base.TryGetNonStructuralIdcDataManager(targetDataSet, out nonStructuralIdcDataManager)) { nonStructuralIdcDataManager = this.CreateNonStructuralIdcDataManager(scopeName, targetDataSet); } if (nonStructuralIdcDataManager.SourceDataScope.CurrentStreamingScopeInstance != nonStructuralIdcDataManager.LastParentScopeInstance) { nonStructuralIdcDataManager.RegisterActiveParent(nonStructuralIdcDataManager.SourceDataScope.CurrentStreamingScopeInstance); nonStructuralIdcDataManager.Advance(); } else { nonStructuralIdcDataManager.SetupEnvironment(); } base.m_odpContext.ReportRuntime.EvaluateSimpleFieldReference(fieldIndex, ref result); } finally { this.SetupEnvironment(this.m_lastRIFObject, this.m_lastOnDemandScopeInstance.Value(), this.m_lastOnDemandScopeInstance); } }
public override void SetupEnvironment() { AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet = base.m_dataRegionDef.GetDataSet(base.m_odpContext.ReportDefinition); base.SetupNewDataSet(dataSet); base.m_odpContext.ReportRuntime.CurrentScope = this; base.SetupEnvironment(base.m_dataRegionDef.RunningValues); }
private DataPipelineManager GetOrCreatePipelineManager(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet, IRIFReportDataScope targetScope) { if (this.m_pipelineManager != null) { if (this.m_pipelineManager.DataSetIndex == dataSet.IndexInCollection) { return(this.m_pipelineManager); } if (base.m_odpContext.IsTablixProcessingComplete(dataSet.IndexInCollection)) { Global.Tracer.Trace(TraceLevel.Verbose, "Performance: While rendering the report: '{0}' the data set {1} was processed multiple times due to rendering traversal order.", base.m_odpContext.ReportContext.ItemPathAsString.MarkAsPrivate(), dataSet.Name.MarkAsPrivate()); } this.CleanupPipelineManager(); base.ShutdownSequentialReadersAndIdcDataManagers(); } if (dataSet.AllowIncrementalProcessing) { this.m_pipelineManager = new IncrementalDataPipelineManager(base.m_odpContext, dataSet); } else { this.m_pipelineManager = new StreamingAtomicDataPipelineManager(base.m_odpContext, dataSet); } this.m_pipelineThrottle = new DataPipelineThrottle(); this.m_pipelineThrottle.StartUsingContext(PipelineAdvanceMode.ToStoppingScopeInstance, targetScope); this.m_pipelineManager.StartProcessing(); this.m_pipelineThrottle.StopUsingContext(); this.TryProcessToNextScopeInstance(targetScope); return(this.m_pipelineManager); }
public void AddOrUpdate(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSetDef, DataSetInstance dataSetInstance, DateTime reportExecutionTime) { try { if (this.m_lockAdd) { Monitor.Enter(this.m_collection); } DataSetImpl dataSetImpl = this.m_collection[dataSetDef.Name] as DataSetImpl; if (dataSetImpl == null) { this.m_collection.Add(dataSetDef.Name, new DataSetImpl(dataSetDef, dataSetInstance, reportExecutionTime)); } else { dataSetImpl.Update(dataSetInstance, reportExecutionTime); } } finally { if (this.m_lockAdd) { Monitor.Exit(this.m_collection); } } }
public DataSetQueryRestartPosition GetRestartPositionForDataSet(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet targetDataSet) { if (!this.m_queryRestartEnabled) { return(null); } List <RestartContext> list = new List <RestartContext>(); List <RelationshipRestartContext> list2 = default(List <RelationshipRestartContext>); if (this.m_relationshipRestartPositions.TryGetValue(targetDataSet, out list2)) { foreach (RelationshipRestartContext item in list2) { list.Add(item); } } foreach (ScopeIDContext item2 in this.m_queryRestartPosition) { if (item2.MemberDefinition.DataScopeInfo.DataSet == targetDataSet && item2.RestartMode != RestartMode.Rom) { list.Add(item2); } } DataSetQueryRestartPosition result = null; if (list.Count > 0) { result = new DataSetQueryRestartPosition(list); } return(result); }
private bool FetchSharedDataSetCached() { AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet = new AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet(this.m_dataSetDefinition.DataSetCore); DataSetInstance dataSetInstance = new DataSetInstance(dataSet); ProcessingDataReader processingDataReader = new ProcessingDataReader(dataSetInstance, dataSet, this.m_odpContext, true); IRowConsumer consumerRequest = this.m_odpContext.ExternalDataSetContext.ConsumerRequest; consumerRequest.SetProcessingDataReader(processingDataReader); long num = 0L; try { while (processingDataReader.GetNextRow()) { AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow underlyingRecordRowObject = processingDataReader.GetUnderlyingRecordRowObject(); consumerRequest.NextRow(underlyingRecordRowObject); num++; } } finally { if (this.m_odpContext.JobContext != null) { lock (this.m_odpContext.JobContext.SyncRoot) { this.m_odpContext.JobContext.RowCount += num; } } } return(true); }
public BaseIdcDataManager(OnDemandProcessingContext odpContext, AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet idcDataSet) { Global.Tracer.Assert(!odpContext.InSubreport, "IDC currently cannot be used inside subreports"); this.m_odpContext = odpContext; this.m_idcDataSet = idcDataSet; this.m_needsServerAggregateTranslation = this.m_idcDataSet.HasScopeWithCustomAggregates; }
public RuntimeLiveQueryExecutor(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSource dataSource, AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet, OnDemandProcessingContext odpContext) { this.m_dataSource = dataSource; this.m_dataSet = dataSet; this.m_odpContext = odpContext; this.m_executionMetrics = new DataProcessingMetrics(dataSet, this.m_odpContext.JobContext, this.m_odpContext.ExecutionLogContext); }
public override bool CalculateAggregate(string aggregateName) { OnDemandProcessingContext odpWorkerContextForTablixProcessing = base.GetOdpWorkerContextForTablixProcessing(); AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo dataAggregateInfo = default(AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo); odpWorkerContextForTablixProcessing.ReportAggregates.TryGetValue(aggregateName, out dataAggregateInfo); if (dataAggregateInfo == null) { return(false); } AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet = base.m_odpContext.ReportDefinition.MappingDataSetIndexToDataSet[dataAggregateInfo.DataSetIndexInCollection]; AspNetCore.ReportingServices.ReportIntermediateFormat.DataSetInstance dataSetInstance = odpWorkerContextForTablixProcessing.GetDataSetInstance(dataSet); if (dataSetInstance != null) { bool flag = odpWorkerContextForTablixProcessing.IsTablixProcessingComplete(dataSet.IndexInCollection); if (!flag) { if (odpWorkerContextForTablixProcessing.IsTablixProcessingMode) { return(false); } OnDemandStateManagerFull onDemandStateManagerFull = (OnDemandStateManagerFull)odpWorkerContextForTablixProcessing.StateManager; onDemandStateManagerFull.PerformOnDemandTablixProcessingWithContextRestore(dataSet); } if (flag || base.m_odpContext.IsPageHeaderFooter) { dataSetInstance.SetupDataSetLevelAggregates(base.m_odpContext); } return(true); } return(false); }
private static Relationship GetActiveRelationship(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet targetDataSet, IRIFReportDataScope sourceDataScope) { AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet = sourceDataScope.DataScopeInfo.DataSet; Relationship defaultRelationship = targetDataSet.GetDefaultRelationship(dataSet); Global.Tracer.Assert(defaultRelationship != null, "Could not find active relationship"); return(defaultRelationship); }
public override IRecordRowReader CreateSequentialDataReader(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet, out AspNetCore.ReportingServices.ReportIntermediateFormat.DataSetInstance dataSetInstance) { LiveRecordRowReader liveRecordRowReader = new LiveRecordRowReader(dataSet, base.m_odpContext); dataSetInstance = liveRecordRowReader.DataSetInstance; base.RegisterDisposableDataReaderOrIdcDataManager(liveRecordRowReader); return(liveRecordRowReader); }
private void PerformOnDemandTablixProcessingWithContextRestore(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet) { Global.Tracer.Assert(!base.m_odpContext.IsTablixProcessingMode, "Nested calls of tablix data processing are not supported"); IInstancePath lastRIFObject = this.m_lastRIFObject; this.PerformOnDemandTablixProcessing(dataSet); this.RestoreContext(lastRIFObject); }
public RuntimeLookupProcessing(OnDemandProcessingContext odpContext, AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet, DataSetInstance dataSetInstance, RuntimeOnDemandDataSetObj lookupOwner) { this.m_odpContext = odpContext; this.m_dataSet = dataSet; this.m_dataSetInstance = dataSetInstance; this.m_lookupOwner = lookupOwner; this.m_mustBufferAllRows = dataSet.HasSameDataSetLookups; this.InitializeRuntimeStructures(); }
private void SetupFieldsForNewDataSetWithoutResettingOldFieldFlags(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataset, bool addRowIndex, bool noRows, bool forceNewFieldsContext) { this.m_currentFields = (this.UseDataSetFieldsCache ? dataset.DataSetCore.FieldsContext : null); if (this.m_currentFields != null && this.m_currentFields.Fields.IsCollectionInitialized && !this.m_currentFields.Fields.NeedsInlineSetup && !forceNewFieldsContext) { return; } this.m_currentFields = new FieldsContext(this, dataset.DataSetCore, addRowIndex, noRows); }
public RelationshipRestartContext(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo[] expressions, AspNetCore.ReportingServices.RdlExpressions.VariantResult[] values, SortDirection[] sortDirections, AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet idcDataSet) : base(RestartMode.Query) { this.m_expressions = expressions; this.m_values = values; this.m_idcDataSet = idcDataSet; this.m_sortDirections = sortDirections; this.NormalizeValues(this.m_values); }
public AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet GetDataSet(string dataSetName) { if (string.IsNullOrEmpty(dataSetName)) { return(null); } AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet result = default(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet); this.m_report.MappingNameToDataSet.TryGetValue(dataSetName, out result); return(result); }
protected virtual void OpenInitialConnectionAndTransaction() { if (this.m_dataSource.Transaction && this.m_mergeTran) { AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.DataSourceInfo dataSourceInfo = this.m_odpContext.GlobalDataSourceInfo[this.m_dataSource.Name]; if (dataSourceInfo != null) { this.m_connection = dataSourceInfo.Connection; this.m_transaction = dataSourceInfo.TransactionInfo; } } Global.Tracer.Trace(TraceLevel.Verbose, "Data source '{0}': Transaction = {1}, MergeTran = {2}, NumDataSets = {3}", this.m_dataSource.Name.MarkAsModelInfo(), this.m_dataSource.Transaction, this.m_mergeTran, this.m_runtimeDataSets.Count); if (this.m_connection == null) { AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet = this.m_runtimeDataSets[0].DataSet; this.m_connection = RuntimeDataSource.OpenConnection(this.m_dataSource, dataSet, this.m_odpContext, this.m_executionMetrics); this.m_needToCloseConnection = true; Global.Tracer.Trace(TraceLevel.Verbose, "Data source '{0}': Created a connection.", this.m_dataSource.Name.MarkAsModelInfo()); } bool flag = false; if (this.m_dataSource.Transaction) { if (this.m_transaction == null) { IDbTransaction transaction = this.m_connection.BeginTransaction(); Global.Tracer.Trace(TraceLevel.Verbose, "Data source '{0}': Begun a transaction.", this.m_dataSource.Name.MarkAsModelInfo()); this.m_transaction = new AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.TransactionInfo(transaction); this.m_isTransactionOwner = true; } IDbTransactionExtension dbTransactionExtension = this.m_transaction.Transaction as IDbTransactionExtension; flag = (dbTransactionExtension != null && dbTransactionExtension.AllowMultiConnection); this.m_useConcurrentDataSetProcessing &= flag; Global.Tracer.Trace(TraceLevel.Verbose, "Data source '{0}': TransactionCanSpanConnections = {1}, ConcurrentDataSets = {2}", this.m_dataSource.Name.MarkAsModelInfo(), flag, this.m_useConcurrentDataSetProcessing); } this.MergeAutoCollationSettings(this.m_connection); if (this.m_isTransactionOwner && this.m_report.SubReportMergeTransactions && !this.m_odpContext.ProcessReportParameters) { IDbConnection connection; if (flag) { connection = null; this.m_isGlobalConnection = false; } else { connection = this.m_connection; this.m_isGlobalConnection = true; } Global.Tracer.Trace(TraceLevel.Verbose, "Data source '{0}': Storing trans+conn into GlobalDataSourceInfo. CloseConnection = {1}.", this.m_dataSource.Name.MarkAsModelInfo(), this.m_needToCloseConnection); DataSourceInfo dataSourceInfo2 = RuntimeDataSource.GetDataSourceInfo(this.m_dataSource, this.m_odpContext); this.m_odpContext.GlobalDataSourceInfo.Add(this.m_dataSource, connection, this.m_transaction, dataSourceInfo2); this.m_isGlobalTransaction = true; } }
private void SetupEnvironment(IRIFReportDataScope reportDataScope, IOnDemandScopeInstance scopeInst, IReference <IOnDemandScopeInstance> scopeInstRef) { AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet = reportDataScope.DataScopeInfo.DataSet; if (base.m_odpContext.CurrentDataSetIndex != dataSet.IndexInCollection) { base.m_odpContext.SetupFieldsForNewDataSet(dataSet, base.m_odpContext.GetDataSetInstance(dataSet), true, false); } scopeInst.SetupEnvironment(); this.m_lastOnDemandScopeInstance = scopeInstRef; this.m_lastRIFObject = reportDataScope; }
protected override List <RuntimeDataSet> CreateRuntimeDataSets() { AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet = base.DataSourceDefinition.DataSets[this.m_parameterDataSetIndex]; DataSetInstance dataSetInstance = new DataSetInstance(dataSet); this.m_runtimeDataSet = new RuntimeParameterDataSet(base.DataSourceDefinition, dataSet, dataSetInstance, base.OdpContext, true, this.m_paramDataCache); List <RuntimeDataSet> list = new List <RuntimeDataSet>(1); list.Add(this.m_runtimeDataSet); return(list); }
private static Relationship GetActiveRelationship(IRIFReportDataScope idcReportDataScope) { AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet = idcReportDataScope.DataScopeInfo.DataSet; LinearJoinInfo linearJoinInfo = idcReportDataScope.DataScopeInfo.JoinInfo as LinearJoinInfo; Global.Tracer.Assert(linearJoinInfo != null, "Did not find expected LinearJoinInfo"); Relationship activeRelationship = linearJoinInfo.GetActiveRelationship(dataSet); Global.Tracer.Assert(activeRelationship != null, "Could not find active relationship"); return(activeRelationship); }
protected bool TryGetNonStructuralIdcDataManager(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet targetDataSet, out NonStructuralIdcDataManager nsIdcDataManager) { BaseIdcDataManager baseIdcDataManager = default(BaseIdcDataManager); if (this.TryGetIdcDataManager(targetDataSet.IndexInCollection, out baseIdcDataManager)) { nsIdcDataManager = (NonStructuralIdcDataManager)baseIdcDataManager; return(true); } nsIdcDataManager = null; return(false); }
public override IRecordRowReader CreateSequentialDataReader(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet, out AspNetCore.ReportingServices.ReportIntermediateFormat.DataSetInstance dataSetInstance) { AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance currentReportInstance = base.m_odpContext.CurrentReportInstance; dataSetInstance = currentReportInstance.GetDataSetInstance(dataSet, base.m_odpContext); AspNetCore.ReportingServices.ReportIntermediateFormat.Persistence.ChunkManager.DataChunkReader dataChunkReader = null; if (!dataSetInstance.NoRows) { dataChunkReader = new AspNetCore.ReportingServices.ReportIntermediateFormat.Persistence.ChunkManager.DataChunkReader(dataSetInstance, base.m_odpContext, dataSetInstance.DataChunkName); base.RegisterDisposableDataReaderOrIdcDataManager(dataChunkReader); } return(dataChunkReader); }
public override List <ScopeValueFieldName> GetScopeValueFieldNameCollection(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet) { List <ScopeValueFieldName> list = new List <ScopeValueFieldName>(); for (int i = 0; i < this.m_expressions.Length; i++) { AspNetCore.ReportingServices.ReportIntermediateFormat.Field field = dataSet.Fields[this.m_expressions[i].FieldIndex]; string dataField = field.DataField; list.Add(new ScopeValueFieldName(dataField, this.m_values[i].Value)); } return(list); }
public void AddRelationshipRestartPosition(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet, RelationshipRestartContext relationshipRestart) { List <RelationshipRestartContext> list = null; if (this.m_relationshipRestartPositions.TryGetValue(dataSet, out list)) { this.m_relationshipRestartPositions[dataSet].Add(relationshipRestart); } else { list = new List <RelationshipRestartContext>(); list.Add(relationshipRestart); this.m_relationshipRestartPositions.Add(dataSet, list); } }
public override List <ScopeValueFieldName> GetScopeValueFieldNameCollection(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet) { List <ScopeValueFieldName> list = new List <ScopeValueFieldName>(); int num = 0; foreach (ScopeValue item in this.m_scopeID.QueryRestartPosition) { AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo expressionInfo = this.Expressions[num]; AspNetCore.ReportingServices.ReportIntermediateFormat.Field field = dataSet.Fields[expressionInfo.FieldIndex]; string dataField = field.DataField; list.Add(new ScopeValueFieldName(dataField, item.Value)); num++; } return(list); }
public FieldsImpl GetFieldsImplForUpdate(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet currentDataSet) { if (currentDataSet.DataSetCore != this.m_currentFields.DataSet) { if (currentDataSet.DataSetCore.FieldsContext != null && this.UseDataSetFieldsCache) { this.m_currentFields = currentDataSet.DataSetCore.FieldsContext; } else { Global.Tracer.Assert(false, "Fields collection is not setup correctly. Actual: " + this.m_currentFields.DataSet.Name.MarkAsPrivate() + " Expected: " + currentDataSet.DataSetCore.Name.MarkAsPrivate()); } } return(this.m_currentFields.Fields); }
public AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet GetDataSet(IRIFDataScope dataScope, string dataSetName) { AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet = null; if (dataScope != null && dataScope.DataScopeInfo != null) { dataSet = dataScope.DataScopeInfo.DataSet; } if (dataSet != null) { return(dataSet); } if (dataSetName == null) { return(null); } return(this.GetDataSet(dataSetName)); }
public static void TablixDataProcessing(OnDemandProcessingContext odpContext, AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet specificDataSetOnly) { bool flag = false; while (!flag) { int indexInCollection = specificDataSetOnly.IndexInCollection; int unprocessedDataSetCount = default(int); bool[] exclusionList = odpContext.GenerateDataSetExclusionList(out unprocessedDataSetCount); indexInCollection = odpContext.ReportDefinition.CalculateDatasetRootIndex(indexInCollection, exclusionList, unprocessedDataSetCount); AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet = odpContext.ReportDefinition.MappingDataSetIndexToDataSet[indexInCollection]; FullAtomicDataPipelineManager fullAtomicDataPipelineManager = new FullAtomicDataPipelineManager(odpContext, dataSet); fullAtomicDataPipelineManager.StartProcessing(); fullAtomicDataPipelineManager.StopProcessing(); flag = (indexInCollection == specificDataSetOnly.IndexInCollection); } }
public List <ScopeValueFieldName> GetQueryRestartPosition(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet) { List <ScopeValueFieldName> list = null; for (int i = 0; i < this.m_restartPosition.Count; i++) { RestartContext restartContext = this.m_restartPosition[i]; if (restartContext.RestartMode == RestartMode.Query) { if (list == null) { list = new List <ScopeValueFieldName>(); } list.AddRange(restartContext.GetScopeValueFieldNameCollection(dataSet)); } } return(list); }
public bool IsTablixProcessingComplete(OnDemandProcessingContext odpContext, int dataSetIndexInCollection) { if (this.m_tablixProcessingComplete == null) { AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet = odpContext.ReportDefinition.MappingDataSetIndexToDataSet[dataSetIndexInCollection]; DataSetInstance dataSetInstance = odpContext.GetDataSetInstance(dataSet); if (dataSetInstance != null) { return(dataSetInstance.OldSnapshotTablixProcessingComplete); } return(false); } bool[] array = default(bool[]); if (this.m_tablixProcessingComplete.TryGetValue(this.GetUniqueIdFromContext(odpContext), out array)) { return(array[dataSetIndexInCollection]); } return(false); }