private void CreateAndInitializeCalculatedFieldWrapper(ObjectModelImpl reportOM, bool readerExtensionsSupported, DataSetCore dataSet, int fieldIndex, Microsoft.ReportingServices.ReportIntermediateFormat.Field fieldDef)
        {
            CalculatedFieldWrapperImpl value = new CalculatedFieldWrapperImpl(fieldDef, reportOM.OdpContext.ReportRuntime);
            bool isAggregationField          = (!readerExtensionsSupported) ? true : false;

            if (dataSet.InterpretSubtotalsAsDetails == Microsoft.ReportingServices.ReportIntermediateFormat.DataSet.TriState.True)
            {
                isAggregationField = true;
            }
            m_fields[fieldIndex] = new FieldImpl(reportOM, value, isAggregationField, fieldDef);
            if (dataSet.ExprHost != null && fieldDef.ExprHost == null)
            {
                fieldDef.SetExprHost(dataSet.ExprHost, reportOM);
            }
        }
        internal FieldsContext(ObjectModelImpl reportOM, DataSetCore dataSet, bool addRowIndex, bool noRows)
        {
            List <Microsoft.ReportingServices.ReportIntermediateFormat.Field> fields = dataSet.Fields;
            int        num        = fields?.Count ?? 0;
            FieldsImpl fieldsImpl = new FieldsImpl(reportOM, num, addRowIndex, noRows);

            Initialize(reportOM, fieldsImpl, dataSet, null, null, allFieldsCleared: true, pendingFieldValueUpdate: false, DataFieldRow.UnInitializedStreamOffset);
            for (int i = 0; i < num; i++)
            {
                Microsoft.ReportingServices.ReportIntermediateFormat.Field field = fields[i];
                if (dataSet.ExprHost != null)
                {
                    field.SetExprHost(dataSet.ExprHost, reportOM);
                }
                fieldsImpl.Add(field.Name, null);
            }
            if (addRowIndex)
            {
                fieldsImpl.AddRowIndexField();
            }
        }