Example #1
0
 internal RuntimeLiveQueryExecutor(Microsoft.ReportingServices.ReportIntermediateFormat.DataSource dataSource, Microsoft.ReportingServices.ReportIntermediateFormat.DataSet dataSet, OnDemandProcessingContext odpContext)
 {
     m_dataSource       = dataSource;
     m_dataSet          = dataSet;
     m_odpContext       = odpContext;
     m_executionMetrics = new DataProcessingMetrics(dataSet, m_odpContext.JobContext, m_odpContext.ExecutionLogContext);
 }
Example #2
0
 internal static DataSourceInfo GetDataSourceInfo(Microsoft.ReportingServices.ReportIntermediateFormat.DataSource dataSource, OnDemandProcessingContext processingContext)
 {
     if (processingContext.CreateAndSetupDataExtensionFunction.MustResolveSharedDataSources)
     {
         return(dataSource.GetDataSourceInfo(processingContext));
     }
     return(null);
 }
Example #3
0
 protected RuntimeDataSource(Microsoft.ReportingServices.ReportIntermediateFormat.Report report, Microsoft.ReportingServices.ReportIntermediateFormat.DataSource dataSource, OnDemandProcessingContext processingContext, bool mergeTransactions)
 {
     m_report           = report;
     m_dataSource       = dataSource;
     m_odpContext       = processingContext;
     m_runtimeDataSets  = null;
     m_mergeTran        = mergeTransactions;
     m_executionMetrics = new DataProcessingMetrics(m_odpContext.JobContext, m_odpContext.ExecutionLogContext);
     Global.Tracer.Assert(m_dataSource.Name != null, "The name of a data source cannot be null.");
 }
Example #4
0
 internal static void CloseConnection(IDbConnection connection, Microsoft.ReportingServices.ReportIntermediateFormat.DataSource dataSource, OnDemandProcessingContext odpContext, DataProcessingMetrics executionMetrics)
 {
     try
     {
         DataSourceInfo dataSourceInfo = GetDataSourceInfo(dataSource, odpContext);
         odpContext.CreateAndSetupDataExtensionFunction.CloseConnection(connection, dataSource, dataSourceInfo);
     }
     catch (Exception innerException)
     {
         throw new ReportProcessingException(ErrorCode.rsErrorClosingConnection, innerException, dataSource.Name);
     }
 }
Example #5
0
 internal RuntimeDataSet(Microsoft.ReportingServices.ReportIntermediateFormat.DataSource dataSource, Microsoft.ReportingServices.ReportIntermediateFormat.DataSet dataSet, DataSetInstance dataSetInstance, OnDemandProcessingContext odpContext, bool processRetrievedData)
     : base(dataSource, dataSet, odpContext)
 {
     m_dataSetInstance      = dataSetInstance;
     m_processRetrievedData = processRetrievedData;
     if (m_odpContext.QueryRestartInfo == null)
     {
         m_restartPosition = null;
     }
     else
     {
         m_restartPosition = m_odpContext.QueryRestartInfo.GetRestartPositionForDataSet(m_dataSet);
     }
 }
        internal override bool NeedPrompt(IParameterDataSource paramDS)
        {
            bool result = false;

            Microsoft.ReportingServices.ReportIntermediateFormat.DataSource dataSource = m_report.DataSources[paramDS.DataSourceIndex];
            if (GetOnDemandContext().DataSourceInfos != null)
            {
                DataSourceInfo byID = GetOnDemandContext().DataSourceInfos.GetByID(dataSource.ID);
                if (byID != null)
                {
                    result = byID.NeedPrompt;
                }
            }
            return(result);
        }
Example #7
0
 internal void Add(Microsoft.ReportingServices.ReportIntermediateFormat.DataSource dataSourceDef)
 {
     try
     {
         if (m_lockAdd)
         {
             Monitor.Enter(m_collection);
         }
         if (!m_collection.ContainsKey(dataSourceDef.Name))
         {
             m_collection.Add(dataSourceDef.Name, new DataSourceImpl(dataSourceDef));
         }
     }
     finally
     {
         if (m_lockAdd)
         {
             Monitor.Exit(m_collection);
         }
     }
 }
Example #8
0
        private int InitOrUpdateDataSetCollection(Microsoft.ReportingServices.ReportIntermediateFormat.Report report, Microsoft.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance, bool initialize)
        {
            int dataSetCount = 0;

            for (int i = 0; i < report.DataSourceCount; i++)
            {
                Microsoft.ReportingServices.ReportIntermediateFormat.DataSource dataSource = report.DataSources[i];
                if (initialize && !dataSource.IsArtificialForSharedDataSets)
                {
                    m_dataSources.Add(dataSource);
                }
                if (dataSource.DataSets != null)
                {
                    for (int j = 0; j < dataSource.DataSets.Count; j++)
                    {
                        InitDataSet(reportInstance, dataSource.DataSets[j], ref dataSetCount);
                    }
                }
            }
            return(dataSetCount);
        }
Example #9
0
        internal static IDbConnection OpenConnection(Microsoft.ReportingServices.ReportIntermediateFormat.DataSource dataSourceObj, Microsoft.ReportingServices.ReportIntermediateFormat.DataSet dataSetObj, OnDemandProcessingContext pc, DataProcessingMetrics metrics)
        {
            IDbConnection dbConnection = null;

            try
            {
                metrics.StartTimer(DataProcessingMetrics.MetricType.OpenConnection);
                DataSourceInfo dataSourceInfo = null;
                string         text           = null;
                if (pc.CreateAndSetupDataExtensionFunction.MustResolveSharedDataSources)
                {
                    text = dataSourceObj.ResolveConnectionString(pc, out dataSourceInfo);
                    if (pc.UseVerboseExecutionLogging)
                    {
                        metrics.ResolvedConnectionString = text;
                    }
                }
                return(pc.CreateAndSetupDataExtensionFunction.OpenDataSourceExtensionConnection(dataSourceObj, text, dataSourceInfo, dataSetObj.Name));
            }
            catch (RSException)
            {
                throw;
            }
            catch (Exception ex2)
            {
                if (AsynchronousExceptionDetection.IsStoppingException(ex2))
                {
                    throw;
                }
                throw new ReportProcessingException(ErrorCode.rsErrorOpeningConnection, ex2, dataSourceObj.Name);
            }
            finally
            {
                long num = metrics.RecordTimerMeasurementWithUpdatedTotal(DataProcessingMetrics.MetricType.OpenConnection);
                Global.Tracer.Trace(TraceLevel.Verbose, "Opening a connection for DataSource: {0} took {1} ms.", dataSourceObj.Name.MarkAsModelInfo(), num);
            }
        }
 internal RuntimeIdcIncrementalDataSet(Microsoft.ReportingServices.ReportIntermediateFormat.DataSource dataSource, Microsoft.ReportingServices.ReportIntermediateFormat.DataSet dataSet, DataSetInstance dataSetInstance, OnDemandProcessingContext odpContext)
     : base(dataSource, dataSet, dataSetInstance, odpContext)
 {
 }
 internal DataSourceImpl(Microsoft.ReportingServices.ReportIntermediateFormat.DataSource dataSourceDef)
 {
     m_dataSource = dataSourceDef;
 }
Example #12
0
 protected RuntimeIncrementalDataSet(Microsoft.ReportingServices.ReportIntermediateFormat.DataSource dataSource, Microsoft.ReportingServices.ReportIntermediateFormat.DataSet dataSet, DataSetInstance dataSetInstance, OnDemandProcessingContext odpContext)
     : base(dataSource, dataSet, dataSetInstance, odpContext, processRetrievedData: true)
 {
 }
 public RuntimeSharedDataSet(Microsoft.ReportingServices.ReportIntermediateFormat.DataSource dataSource, Microsoft.ReportingServices.ReportIntermediateFormat.DataSet dataSet, DataSetInstance dataSetInstance, OnDemandProcessingContext processingContext)
     : base(dataSource, dataSet, dataSetInstance, processingContext, dataSet.DataSetCore.Filters != null || dataSet.DataSetCore.HasCalculatedFields(), null)
 {
     m_consumerRequest = m_odpContext.ExternalDataSetContext.ConsumerRequest;
 }
Example #14
0
 internal RuntimeDataSourceParameters(Microsoft.ReportingServices.ReportIntermediateFormat.Report report, Microsoft.ReportingServices.ReportIntermediateFormat.DataSource dataSource, OnDemandProcessingContext processingContext, int parameterDataSetIndex, ReportParameterDataSetCache aCache)
     : base(report, dataSource, processingContext, mergeTransactions: false)
 {
     Global.Tracer.Assert(parameterDataSetIndex != -1, "Parameter DataSet index must be specified when processing parameters");
     m_parameterDataSetIndex = parameterDataSetIndex;
     m_paramDataCache        = aCache;
 }
Example #15
0
 protected RuntimeAtomicDataSet(Microsoft.ReportingServices.ReportIntermediateFormat.DataSource dataSource, Microsoft.ReportingServices.ReportIntermediateFormat.DataSet dataSet, DataSetInstance dataSetInstance, OnDemandProcessingContext odpContext, bool processRetrievedData)
     : base(dataSource, dataSet, dataSetInstance, odpContext, processRetrievedData)
 {
 }
 public RuntimeOnDemandDataSet(Microsoft.ReportingServices.ReportIntermediateFormat.DataSource dataSource, Microsoft.ReportingServices.ReportIntermediateFormat.DataSet dataSet, DataSetInstance dataSetInstance, OnDemandProcessingContext odpContext, bool processFromLiveDataReader, bool generateGroupTree, bool canWriteDataChunk)
     : base(dataSource, dataSet, dataSetInstance, odpContext, canWriteDataChunk, processRetrievedData: true)
 {
     m_processFromLiveDataReader = processFromLiveDataReader;
     m_generateGroupTree         = generateGroupTree;
 }
Example #17
0
 protected RuntimeAtomicDataSource(Microsoft.ReportingServices.ReportIntermediateFormat.Report report, Microsoft.ReportingServices.ReportIntermediateFormat.DataSource dataSource, OnDemandProcessingContext processingContext, bool mergeTransactions)
     : base(report, dataSource, processingContext, mergeTransactions)
 {
 }
 public RuntimeParameterDataSet(Microsoft.ReportingServices.ReportIntermediateFormat.DataSource dataSource, Microsoft.ReportingServices.ReportIntermediateFormat.DataSet dataSet, DataSetInstance dataSetInstance, OnDemandProcessingContext processingContext, bool mustEvaluateThroughReportObjectModel, ReportParameterDataSetCache aCache)
     : base(dataSource, dataSet, dataSetInstance, processingContext, processRetrievedData: true)
 {
     m_parameterDataSetObj = aCache;
     m_mustEvaluateThroughReportObjectModel = mustEvaluateThroughReportObjectModel;
 }