private bool FetchSharedDataSetCached()
        {
            Microsoft.ReportingServices.ReportIntermediateFormat.DataSet dataSet = new Microsoft.ReportingServices.ReportIntermediateFormat.DataSet(m_dataSetDefinition.DataSetCore);
            ProcessingDataReader processingDataReader = new ProcessingDataReader(new DataSetInstance(dataSet), dataSet, m_odpContext, overrideWithSharedDataSetChunkSettings: true);
            IRowConsumer         consumerRequest      = m_odpContext.ExternalDataSetContext.ConsumerRequest;

            consumerRequest.SetProcessingDataReader(processingDataReader);
            long num = 0L;

            try
            {
                while (processingDataReader.GetNextRow())
                {
                    Microsoft.ReportingServices.ReportIntermediateFormat.RecordRow underlyingRecordRowObject = processingDataReader.GetUnderlyingRecordRowObject();
                    consumerRequest.NextRow(underlyingRecordRowObject);
                    num++;
                }
            }
            finally
            {
                if (m_odpContext.JobContext != null)
                {
                    lock (m_odpContext.JobContext.SyncRoot)
                    {
                        m_odpContext.JobContext.RowCount += num;
                    }
                }
            }
            return(true);
        }
Ejemplo n.º 2
0
        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);
        }
 protected override void InitializeBeforeFirstRow(bool hasRows)
 {
     base.InitializeBeforeFirstRow(hasRows);
     if (WritesDataChunk)
     {
         if (hasRows)
         {
             m_dataReader.RecordSetInfo.PopulateExtendedFieldsProperties(m_dataSetInstance);
         }
         m_dataChunkWriter.CreateDataChunkAndWriteHeader(m_dataReader.RecordSetInfo);
     }
     if (m_consumerRequest != null)
     {
         m_consumerRequest.SetProcessingDataReader(m_dataReader);
     }
 }