protected AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow ReadOneRow(out int rowIndex)
 {
     AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow result = null;
     rowIndex = -1;
     if (this.m_allDataRowsRead)
     {
         return(result);
     }
     do
     {
         bool flag = this.m_dataReader != null && this.m_dataReader.GetNextRow();
         if (this.m_dataRowsRead == 0)
         {
             this.InitializeBeforeFirstRow(flag);
         }
         if (flag)
         {
             base.m_odpContext.CheckAndThrowIfAborted();
             result   = this.ReadRow();
             rowIndex = this.m_dataRowsRead;
             this.IncrementRowCounterAndTrace();
         }
         else
         {
             result = null;
             this.m_allDataRowsRead = true;
         }
     }while (!this.m_allDataRowsRead && this.m_restartPosition != null && this.m_restartPosition.ShouldSkip(base.m_odpContext, result));
     if (this.m_restartPosition != null)
     {
         this.m_restartPosition.DisableRowSkipping(result);
     }
     return(result);
 }
示例#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);
        }
示例#3
0
 public RecordRow(RecordRow original, int[] mappingDataSetFieldIndexesToDataChunk)
 {
     this.m_streamPosition = original.m_streamPosition;
     this.m_isAggregateRow = original.m_isAggregateRow;
     this.m_recordFields   = original.m_recordFields;
     this.ApplyFieldMapping(mappingDataSetFieldIndexesToDataChunk);
 }
示例#4
0
 private bool SetupNextRow()
 {
     try
     {
         int rowIndex = default(int);
         this.m_currentRow = base.ReadOneRow(out rowIndex);
         if (this.m_currentRow == null)
         {
             return(false);
         }
         FieldsImpl fieldsImpl = base.m_odpContext.ReportObjectModel.FieldsImpl;
         fieldsImpl.NewRow();
         if (fieldsImpl.AddRowIndex)
         {
             fieldsImpl.SetRowIndex(rowIndex);
         }
         base.m_odpContext.ReportObjectModel.UpdateFieldValues(false, this.m_currentRow, base.m_dataSetInstance, base.HasServerAggregateMetadata);
         return(true);
     }
     catch (Exception)
     {
         this.CleanupForException();
         this.FinalCleanup();
         throw;
     }
 }
示例#5
0
 protected override void ProcessRow(AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow row, int rowNumber)
 {
     if (this.m_processFromLiveDataReader && !base.m_dataSet.IsReferenceToSharedDataSet)
     {
         base.ProcessRow(row, rowNumber);
     }
     this.m_dataProcessingController.NextRow(row, rowNumber, this.m_processFromLiveDataReader && !base.m_canWriteDataChunk, base.HasServerAggregateMetadata);
 }
        protected void ProcessRows()
        {
            int rowNumber = default(int);

            for (AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow recordRow = base.ReadOneRow(out rowNumber); recordRow != null; recordRow = base.ReadOneRow(out rowNumber))
            {
                this.ProcessRow(recordRow, rowNumber);
            }
        }
 protected override void ProcessRow(AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow row, int rowNumber)
 {
     if (base.m_mustEvaluateThroughReportObjectModel)
     {
         base.ProcessRow(row, rowNumber);
     }
     else
     {
         this.m_currentRow = row;
         this.PostFilterNextRow();
     }
 }
        private AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow ReadRow()
        {
            int count = base.m_dataSet.Fields.Count;

            AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow underlyingRecordRowObject = this.m_dataReader.GetUnderlyingRecordRowObject();
            if (underlyingRecordRowObject != null)
            {
                return(underlyingRecordRowObject);
            }
            base.m_executionMetrics.StartTotalTimer();
            underlyingRecordRowObject = this.ConstructRecordRow();
            base.m_executionMetrics.RecordTotalTimerMeasurement();
            return(underlyingRecordRowObject);
        }
示例#9
0
 public void UpdateRecordRow(AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow recordRow)
 {
     this.m_recordRow = recordRow;
     if (this.m_fields != null)
     {
         for (int i = 0; i < this.m_fields.Length; i++)
         {
             FieldInstance fieldInstance = this.m_fields[i];
             if (fieldInstance != null)
             {
                 fieldInstance.UpdateRecordField(this.m_recordRow.RecordFields[i]);
             }
         }
     }
 }
 public override void PostFilterNextRow()
 {
     if (base.m_mustEvaluateThroughReportObjectModel)
     {
         this.m_currentRow = new AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow(base.m_odpContext.ReportObjectModel.FieldsImpl, base.m_dataSet.DataSetCore.Fields.Count, base.m_dataSetInstance.FieldInfos);
     }
     if (this.WritesDataChunk)
     {
         this.m_dataChunkWriter.WriteRecordRow(this.m_currentRow);
     }
     if (this.m_consumerRequest != null)
     {
         this.m_consumerRequest.NextRow(this.m_currentRow);
     }
 }
        private void PopulateServerAggregateInformationFromIndicatorFields(AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow recordRow)
        {
            int num  = 0;
            int num2 = 0;

            for (int i = 0; i < recordRow.RecordFields.Length; i++)
            {
                AspNetCore.ReportingServices.ReportIntermediateFormat.RecordField recordField = recordRow.RecordFields[i];
                AspNetCore.ReportingServices.ReportIntermediateFormat.Field       field       = base.m_dataSet.Fields[i];
                if (recordField != null && field.HasAggregateIndicatorField)
                {
                    num++;
                    AspNetCore.ReportingServices.ReportIntermediateFormat.Field field2 = base.m_dataSet.Fields[field.AggregateIndicatorFieldIndex];
                    bool flag = false;
                    bool flag2;
                    if (field2.IsCalculatedField)
                    {
                        if (field2.Value.Type == AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Constant)
                        {
                            flag  = field2.Value.BoolValue;
                            flag2 = false;
                        }
                        else
                        {
                            flag2 = !AspNetCore.ReportingServices.RdlExpressions.ReportRuntime.TryProcessObjectToBoolean(field2.Value.LiteralInfo.Value, out flag);
                        }
                    }
                    else
                    {
                        AspNetCore.ReportingServices.ReportIntermediateFormat.RecordField recordField2 = recordRow.RecordFields[field.AggregateIndicatorFieldIndex];
                        flag2 = (recordField2 == null || recordField2.FieldStatus != 0 || !AspNetCore.ReportingServices.RdlExpressions.ReportRuntime.TryProcessObjectToBoolean(recordField2.FieldValue, out flag));
                    }
                    if (flag2)
                    {
                        base.m_odpContext.ErrorContext.Register(ProcessingErrorCode.rsMissingOrInvalidAggregateIndicatorFieldValue, Severity.Warning, AspNetCore.ReportingServices.ReportProcessing.ObjectType.Field, field2.Name, "AggregateIndicatorField", base.m_dataSet.Name.MarkAsPrivate(), field.Name.MarkAsModelInfo());
                    }
                    else if (flag)
                    {
                        num2++;
                        recordRow.IsAggregateRow = true;
                    }
                    recordField.IsAggregationField = !flag;
                }
            }
            recordRow.AggregationFieldCount = num - num2;
        }
        protected override void ProcessRow(AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow row, int rowNumber)
        {
            FieldsImpl fieldsImpl = base.m_odpContext.ReportObjectModel.FieldsImpl;

            fieldsImpl.NewRow();
            base.m_odpContext.ReportObjectModel.UpdateFieldValues(false, row, base.m_dataSetInstance, base.HasServerAggregateMetadata);
            bool flag = true;

            if (this.m_filters != null)
            {
                flag = this.m_filters.PassFilters(new DataFieldRow(base.m_odpContext.ReportObjectModel.FieldsImpl, false));
            }
            if (flag)
            {
                this.PostFilterNextRow();
            }
        }
 public void NextRow(AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow originalRow)
 {
     if (base.ProcessRetrievedData)
     {
         base.m_odpContext.CheckAndThrowIfAborted();
         if (base.m_dataRowsRead == 0)
         {
             this.InitializeBeforeFirstRow(true);
         }
         AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow recordRow = null;
         recordRow = ((!this.m_iRowConsumerMappingIdentical) ? new AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow(originalRow, this.m_iRowConsumerMappingDataSetFieldIndexesToDataChunk) : originalRow);
         if (base.m_dataSet.IsReferenceToSharedDataSet && recordRow.IsAggregateRow && base.m_dataSet.InterpretSubtotalsAsDetails != AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet.TriState.False)
         {
             recordRow.IsAggregateRow = false;
         }
         this.ProcessRow(recordRow, base.m_dataRowsRead);
         base.IncrementRowCounterAndTrace();
     }
 }
        public void NextRow(AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow row, int rowNumber, bool useRowOffset, bool readerExtensionsSupported)
        {
            FieldsImpl fieldsImplForUpdate = this.m_odpContext.ReportObjectModel.GetFieldsImplForUpdate(this.m_dataSet);

            if (useRowOffset)
            {
                fieldsImplForUpdate.NewRow();
            }
            else
            {
                fieldsImplForUpdate.NewRow(row.StreamPosition);
            }
            if (fieldsImplForUpdate.AddRowIndex)
            {
                fieldsImplForUpdate.SetRowIndex(rowNumber);
            }
            this.m_odpContext.ReportObjectModel.UpdateFieldValues(false, row, this.m_dataSetInstance, readerExtensionsSupported);
            this.m_dataSetObj.NextRow();
        }
示例#15
0
        public bool ShouldSkip(OnDemandProcessingContext odpContext, AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow row)
        {
            if (row != null && this.m_enableRowSkipping)
            {
                foreach (RestartContext item in this.m_restartPosition)
                {
                    switch (item.DoesNotMatchRowRecordField(odpContext, row.RecordFields))
                    {
                    case RowSkippingControlFlag.Skip:
                        if (item.RestartMode == RestartMode.Query)
                        {
                            item.TraceStartAtRecoveryMessage();
                        }
                        return(true);

                    case RowSkippingControlFlag.Stop:
                        return(false);
                    }
                }
            }
            return(false);
        }
示例#16
0
 public RowInstance(FieldInfo[] fieldInfos, AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow recordRow)
 {
     this.m_recordRow  = recordRow;
     this.m_fieldInfos = fieldInfos;
 }
        public void UpdateFieldValues(ObjectModelImpl reportOM, bool useDataSetFieldsCache, bool reuseFieldObjects, AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow row, DataSetInstance dataSetInstance, bool readerExtensionsSupported)
        {
            Global.Tracer.Assert(null != row, "Empty data row / no data reader");
            if (this.m_dataSetInstance != dataSetInstance)
            {
                this.m_dataSetInstance = dataSetInstance;
                this.m_dataSet         = dataSetInstance.DataSetDef.DataSetCore;
                if (this.m_dataSet.FieldsContext != null && useDataSetFieldsCache)
                {
                    this.m_fields = this.m_dataSet.FieldsContext.Fields;
                }
                else
                {
                    reuseFieldObjects = false;
                }
                this.m_dataReader              = null;
                this.m_lastRowOffset           = DataFieldRow.UnInitializedStreamOffset;
                this.m_pendingFieldValueUpdate = false;
            }
            this.m_allFieldsCleared = false;
            FieldInfo[] fieldInfos = dataSetInstance.FieldInfos;
            if (this.m_fields.ReaderExtensionsSupported && this.m_dataSet.InterpretSubtotalsAsDetails == AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet.TriState.False)
            {
                this.m_fields.IsAggregateRow        = row.IsAggregateRow;
                this.m_fields.AggregationFieldCount = row.AggregationFieldCount;
                if (!row.IsAggregateRow)
                {
                    this.m_fields.AggregationFieldCountForDetailRow = row.AggregationFieldCount;
                }
            }
            int num   = 0;
            int count = this.m_dataSet.Fields.Count;
            int num2  = row.RecordFields.Length;

            for (num = 0; num < num2; num++)
            {
                FieldImpl fieldImpl = reuseFieldObjects ? this.m_fields.GetFieldByIndex(num) : null;
                AspNetCore.ReportingServices.ReportIntermediateFormat.Field       fieldDef    = this.m_dataSet.Fields[num];
                AspNetCore.ReportingServices.ReportIntermediateFormat.RecordField recordField = row.RecordFields[num];
                if (recordField == null)
                {
                    if (!reuseFieldObjects || fieldImpl == null)
                    {
                        fieldImpl = new FieldImpl(reportOM, DataFieldStatus.IsMissing, null, fieldDef);
                    }
                    else
                    {
                        fieldImpl.UpdateValue(null, false, DataFieldStatus.IsMissing, null);
                    }
                }
                else if (recordField.FieldStatus == DataFieldStatus.None)
                {
                    if (!reuseFieldObjects || fieldImpl == null)
                    {
                        fieldImpl = new FieldImpl(reportOM, recordField.FieldValue, recordField.IsAggregationField, fieldDef);
                    }
                    else
                    {
                        fieldImpl.UpdateValue(recordField.FieldValue, recordField.IsAggregationField, DataFieldStatus.None, null);
                    }
                }
                else if (!reuseFieldObjects || fieldImpl == null)
                {
                    fieldImpl = new FieldImpl(reportOM, recordField.FieldStatus, ReportRuntime.GetErrorName(recordField.FieldStatus, null), fieldDef);
                }
                else
                {
                    fieldImpl.UpdateValue(null, false, recordField.FieldStatus, ReportRuntime.GetErrorName(recordField.FieldStatus, null));
                }
                if (recordField != null && fieldInfos != null)
                {
                    FieldInfo fieldInfo = fieldInfos[num];
                    if (fieldInfo != null && fieldInfo.PropertyCount != 0 && recordField.FieldPropertyValues != null)
                    {
                        for (int i = 0; i < fieldInfo.PropertyCount; i++)
                        {
                            fieldImpl.SetProperty(fieldInfo.PropertyNames[i], recordField.FieldPropertyValues[i]);
                        }
                    }
                }
                this.m_fields[num] = fieldImpl;
            }
            if (num < count)
            {
                if (!reuseFieldObjects && reportOM.OdpContext.ReportRuntime.ReportExprHost != null)
                {
                    this.m_dataSet.SetExprHost(reportOM.OdpContext.ReportRuntime.ReportExprHost, reportOM);
                }
                for (; num < count; num++)
                {
                    AspNetCore.ReportingServices.ReportIntermediateFormat.Field fieldDef2 = this.m_dataSet.Fields[num];
                    FieldImpl fieldImpl2 = reuseFieldObjects ? this.m_fields.GetFieldByIndex(num) : null;
                    if (reuseFieldObjects && fieldImpl2 != null)
                    {
                        if (!fieldImpl2.ResetCalculatedField())
                        {
                            this.CreateAndInitializeCalculatedFieldWrapper(reportOM, readerExtensionsSupported, this.m_dataSet, num, fieldDef2);
                        }
                    }
                    else
                    {
                        this.CreateAndInitializeCalculatedFieldWrapper(reportOM, readerExtensionsSupported, this.m_dataSet, num, fieldDef2);
                    }
                }
            }
        }
 public void UpdateFieldValues(bool reuseFieldObjects, AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow row, DataSetInstance dataSetInstance, bool readerExtensionsSupported)
 {
     this.m_currentFields.UpdateFieldValues(this, this.UseDataSetFieldsCache, reuseFieldObjects, row, dataSetInstance, readerExtensionsSupported);
 }
 protected abstract void ProcessRow(AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow aRow, int rowNumber);
        private AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow ConstructRecordRow()
        {
            AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow recordRow = new AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow();
            bool flag  = this.m_dataReader.ReaderExtensionsSupported && !base.m_dataSet.HasAggregateIndicatorFields;
            bool flag2 = this.HasServerAggregateMetadata && (base.m_dataSet.InterpretSubtotalsAsDetails == AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet.TriState.False || (base.m_odpContext.IsSharedDataSetExecutionOnly && base.m_dataSet.InterpretSubtotalsAsDetails == AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet.TriState.Auto));

            AspNetCore.ReportingServices.ReportIntermediateFormat.RecordField[] array2 = recordRow.RecordFields = new AspNetCore.ReportingServices.ReportIntermediateFormat.RecordField[base.m_dataSet.NonCalculatedFieldCount];
            for (int i = 0; i < array2.Length; i++)
            {
                AspNetCore.ReportingServices.ReportIntermediateFormat.Field field = base.m_dataSet.Fields[i];
                if (!this.m_dataSetInstance.IsFieldMissing(i))
                {
                    AspNetCore.ReportingServices.ReportIntermediateFormat.RecordField recordField = new AspNetCore.ReportingServices.ReportIntermediateFormat.RecordField();
                    try
                    {
                        array2[i] = recordField;
                        recordField.FieldValue = this.m_dataReader.GetColumn(i);
                        if (flag2)
                        {
                            if (flag)
                            {
                                recordField.IsAggregationField = this.m_dataReader.IsAggregationField(i);
                            }
                        }
                        else
                        {
                            recordField.IsAggregationField = true;
                        }
                        recordField.FieldStatus = DataFieldStatus.None;
                    }
                    catch (ReportProcessingException_FieldError aException)
                    {
                        recordField = (array2[i] = this.HandleFieldError(aException, i, field.Name));
                        if (recordField != null && !flag2)
                        {
                            recordField.IsAggregationField = true;
                        }
                    }
                    this.ReadExtendedPropertiesForRecordField(i, field, recordField);
                }
                else
                {
                    array2[i] = null;
                }
            }
            if (flag2)
            {
                if (flag)
                {
                    recordRow.IsAggregateRow        = this.m_dataReader.IsAggregateRow;
                    recordRow.AggregationFieldCount = this.m_dataReader.AggregationFieldCount;
                }
                else
                {
                    this.PopulateServerAggregateInformationFromIndicatorFields(recordRow);
                }
            }
            else
            {
                recordRow.AggregationFieldCount = base.m_dataSet.Fields.Count;
            }
            return(recordRow);
        }
示例#21
0
 public void DisableRowSkipping(AspNetCore.ReportingServices.ReportIntermediateFormat.RecordRow row)
 {
     this.m_enableRowSkipping = false;
 }