public override void ThrowExceptionForQueryBackedParameter(ReportProcessingException_FieldError aError, string aParamName, int aDataSourceIndex, int aDataSetIndex, int aFieldIndex, string propertyName)
 {
     AspNetCore.ReportingServices.ReportProcessing.DataSet dataSet = this.m_report.DataSources[aDataSourceIndex].DataSets[aDataSetIndex];
     throw new ReportProcessingException(ErrorCode.rsReportParameterQueryProcessingError, aParamName.MarkAsPrivate(), propertyName, dataSet.Fields[aFieldIndex].Name.MarkAsModelInfo(), dataSet.Name.MarkAsPrivate(), ReportRuntime.GetErrorName(aError.Status, aError.Message));
 }
 private void ThrowIfErrorOccurred(string propertyName, bool errorOccurred, DataFieldStatus fieldStatus)
 {
     if (!errorOccurred)
     {
         return;
     }
     if (fieldStatus != 0)
     {
         throw new ReportProcessingException(ErrorCode.rsFilterFieldError, this.m_objectType, this.m_objectName, propertyName, ReportRuntime.GetErrorName(fieldStatus, null));
     }
     throw new ReportProcessingException(ErrorCode.rsFilterEvaluationError, this.m_objectType, this.m_objectName, propertyName);
 }
        public object GetFieldValue(int aliasIndex)
        {
            RecordField recordField = this.m_recordFields[aliasIndex];

            Global.Tracer.Assert(null != recordField);
            if (recordField.FieldStatus != 0)
            {
                throw new ReportProcessingException_FieldError(recordField.FieldStatus, ReportRuntime.GetErrorName(recordField.FieldStatus, null));
            }
            return(recordField.FieldValue);
        }
        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);
                    }
                }
            }
        }