internal override bool Initialize(InitializationContext context)
 {
     base.Initialize(context);
     if (m_filters != null)
     {
         for (int i = 0; i < m_filters.Count; i++)
         {
             m_filters[i].Initialize(context);
         }
     }
     if (m_noRows != null)
     {
         m_noRows.Initialize("NoRows", context);
         context.ExprHostBuilder.GenericNoRows(m_noRows);
     }
     if (m_userSortExpressions != null)
     {
         context.ExprHostBuilder.UserSortExpressionsStart();
         for (int j = 0; j < m_userSortExpressions.Count; j++)
         {
             ExpressionInfo expression = m_userSortExpressions[j];
             context.ExprHostBuilder.UserSortExpression(expression);
         }
         context.ExprHostBuilder.UserSortExpressionsEnd();
     }
     return(false);
 }
 internal void Initialize(InitializationContext context)
 {
     if (m_value != null)
     {
         m_value.Initialize("Value", context);
         context.ExprHostBuilder.OWCChartColumnsValue(m_value);
     }
 }
 private void InternalInitialize(InitializationContext context)
 {
     context.ExprHostBuilder.DataSourceStart(m_name);
     if (m_connectString != null)
     {
         m_connectString.Initialize("ConnectString", context);
         context.ExprHostBuilder.DataSourceConnectString(m_connectString);
     }
     m_exprHostID = context.ExprHostBuilder.DataSourceEnd();
 }
Example #4
0
 internal void Initialize(InitializationContext context)
 {
     if (Value != null)
     {
         context.ExprHostBuilder.CalcFieldStart(m_name);
         m_value.Initialize("Field", context);
         context.ExprHostBuilder.GenericValue(m_value);
         m_exprHostID = context.ExprHostBuilder.CalcFieldEnd();
     }
 }
Example #5
0
        internal void Initialize(InitializationContext context, Mode mode)
        {
            if (m_styleClass != null)
            {
                m_styleClass.Initialize(context);
            }
            if (m_title != null)
            {
                m_title.Initialize(context);
            }
            if (m_minorGridLines != null)
            {
                context.ExprHostBuilder.MinorGridLinesStyleStart();
                m_minorGridLines.Initialize(context);
                context.ExprHostBuilder.MinorGridLinesStyleEnd();
            }
            if (m_majorGridLines != null)
            {
                context.ExprHostBuilder.MajorGridLinesStyleStart();
                m_majorGridLines.Initialize(context);
                context.ExprHostBuilder.MajorGridLinesStyleEnd();
            }
            string str = mode.ToString();

            if (m_min != null)
            {
                m_min.Initialize(str + ".Min", context);
                context.ExprHostBuilder.AxisMin(m_min);
            }
            if (m_max != null)
            {
                m_max.Initialize(str + ".Max", context);
                context.ExprHostBuilder.AxisMax(m_max);
            }
            if (m_crossAt != null)
            {
                m_crossAt.Initialize(str + ".CrossAt", context);
                context.ExprHostBuilder.AxisCrossAt(m_crossAt);
            }
            if (m_majorInterval != null)
            {
                m_majorInterval.Initialize(str + ".MajorInterval", context);
                context.ExprHostBuilder.AxisMajorInterval(m_majorInterval);
            }
            if (m_minorInterval != null)
            {
                m_minorInterval.Initialize(str + ".MinorInterval", context);
                context.ExprHostBuilder.AxisMinorInterval(m_minorInterval);
            }
            if (m_customProperties != null)
            {
                m_customProperties.Initialize(str + ".", isCustomProperty: true, context);
            }
        }
Example #6
0
 internal void Initialize(InitializationContext context)
 {
     context.ExprHostBuilder.GroupingStart(m_name);
     DataRendererInitialize(context);
     if (m_groupExpressions != null)
     {
         for (int i = 0; i < m_groupExpressions.Count; i++)
         {
             ExpressionInfo expressionInfo = m_groupExpressions[i];
             expressionInfo.GroupExpressionInitialize(context);
             context.ExprHostBuilder.GroupingExpression(expressionInfo);
         }
     }
     if (m_groupLabel != null)
     {
         m_groupLabel.Initialize("Label", context);
         context.ExprHostBuilder.GenericLabel(m_groupLabel);
     }
     if (m_filters != null)
     {
         for (int j = 0; j < m_filters.Count; j++)
         {
             m_filters[j].Initialize(context);
         }
     }
     if (m_parent != null)
     {
         context.ExprHostBuilder.GroupingParentExpressionsStart();
         for (int k = 0; k < m_parent.Count; k++)
         {
             ExpressionInfo expressionInfo2 = m_parent[k];
             expressionInfo2.GroupExpressionInitialize(context);
             context.ExprHostBuilder.GroupingParentExpression(expressionInfo2);
         }
         context.ExprHostBuilder.GroupingParentExpressionsEnd();
     }
     if (m_customProperties != null)
     {
         m_customProperties.Initialize(null, isCustomProperty: true, context);
     }
     if (m_userSortExpressions != null)
     {
         context.ExprHostBuilder.UserSortExpressionsStart();
         for (int l = 0; l < m_userSortExpressions.Count; l++)
         {
             ExpressionInfo expression = m_userSortExpressions[l];
             context.ExprHostBuilder.UserSortExpression(expression);
         }
         context.ExprHostBuilder.UserSortExpressionsEnd();
     }
     context.ExprHostBuilder.GroupingEnd();
 }
Example #7
0
 internal void Initialize(InitializationContext context)
 {
     context.ExprHostBuilder.ChartTitleStart();
     if (m_caption != null)
     {
         m_caption.Initialize("Caption", context);
         context.ExprHostBuilder.ChartCaption(m_caption);
     }
     if (m_styleClass != null)
     {
         m_styleClass.Initialize(context);
     }
     context.ExprHostBuilder.ChartTitleEnd();
 }
Example #8
0
 internal void Initialize(InitializationContext context)
 {
     context.ExprHostBuilder.SortingStart();
     if (m_sortExpressions != null)
     {
         for (int i = 0; i < m_sortExpressions.Count; i++)
         {
             ExpressionInfo expressionInfo = m_sortExpressions[i];
             expressionInfo.Initialize("SortExpression", context);
             context.ExprHostBuilder.SortingExpression(expressionInfo);
         }
     }
     context.ExprHostBuilder.SortingEnd();
 }
Example #9
0
 internal void Initialize(InitializationContext context)
 {
     if (m_value != null)
     {
         m_value.Initialize("DataLabel", context);
         context.ExprHostBuilder.DataLabelValue(m_value);
     }
     if (m_styleClass != null)
     {
         context.ExprHostBuilder.DataLabelStyleStart();
         m_styleClass.Initialize(context);
         context.ExprHostBuilder.DataLabelStyleEnd();
     }
 }
 internal void Initialize(InitializationContext context, bool isContainer, bool tableRowCol)
 {
     if (m_hidden != null)
     {
         m_hidden.Initialize("Hidden", context);
         if (tableRowCol)
         {
             context.ExprHostBuilder.TableRowColVisibilityHiddenExpressionsExpr(m_hidden);
         }
         else
         {
             context.ExprHostBuilder.GenericVisibilityHidden(m_hidden);
         }
     }
     m_toggleItemInfo = RegisterReceiver(context, isContainer);
 }
Example #11
0
 internal override bool Initialize(InitializationContext context)
 {
     context.ObjectType = ObjectType;
     context.ObjectName = m_name;
     base.Initialize(context);
     if (m_visibility != null)
     {
         m_visibility.Initialize(context, isContainer: false, tableRowCol: false);
     }
     if (m_value != null)
     {
         m_value.Initialize("Value", context);
     }
     if (m_hideDuplicates != null)
     {
         context.ValidateHideDuplicateScope(m_hideDuplicates, this);
     }
     return(true);
 }
Example #12
0
 internal void Initialize(string propertyName, bool isCustomProperty, CustomPropertyUniqueNameValidator validator, InitializationContext context)
 {
     context.ExprHostBuilder.DataValueStart();
     if (m_name != null)
     {
         m_name.Initialize(propertyName + ".Name", context);
         if (isCustomProperty && ExpressionInfo.Types.Constant == m_name.Type)
         {
             validator.Validate(Severity.Error, context.ObjectType, context.ObjectName, m_name.Value, context.ErrorContext);
         }
         context.ExprHostBuilder.DataValueName(m_name);
     }
     if (m_value != null)
     {
         m_value.Initialize(propertyName + ".Value", context);
         context.ExprHostBuilder.DataValueValue(m_value);
     }
     m_exprHostID = context.ExprHostBuilder.DataValueEnd(isCustomProperty);
 }
 internal void Initialize(InitializationContext context, bool queryParam)
 {
     if (m_value != null)
     {
         m_value.Initialize("Value", context);
         if (!queryParam)
         {
             context.ExprHostBuilder.GenericValue(m_value);
         }
         else
         {
             context.ExprHostBuilder.QueryParameterValue(m_value);
         }
     }
     if (m_omit != null)
     {
         m_omit.Initialize("Omit", context);
         context.ExprHostBuilder.ParameterOmit(m_omit);
     }
 }
Example #14
0
 internal void Initialize(InitializationContext context)
 {
     context.ExprHostBuilder.FilterStart();
     if (m_expression != null)
     {
         m_expression.Initialize("FilterExpression", context);
         context.ExprHostBuilder.FilterExpression(m_expression);
     }
     if (m_values != null)
     {
         for (int i = 0; i < m_values.Count; i++)
         {
             ExpressionInfo expressionInfo = m_values[i];
             Global.Tracer.Assert(expressionInfo != null);
             expressionInfo.Initialize("FilterValue", context);
             context.ExprHostBuilder.FilterValue(expressionInfo);
         }
     }
     m_exprHostID = context.ExprHostBuilder.FilterEnd();
 }
Example #15
0
 internal void Initialize(InitializationContext context)
 {
     context.ExprHostBuilder.ActionStart();
     if (m_hyperLinkURL != null)
     {
         m_hyperLinkURL.Initialize("Hyperlink", context);
         context.ExprHostBuilder.ActionHyperlink(m_hyperLinkURL);
     }
     if (m_drillthroughReportName != null)
     {
         m_drillthroughReportName.Initialize("DrillthroughReportName", context);
         context.ExprHostBuilder.ActionDrillThroughReportName(m_drillthroughReportName);
     }
     if (m_drillthroughParameters != null)
     {
         for (int i = 0; i < m_drillthroughParameters.Count; i++)
         {
             ParameterValue parameterValue = m_drillthroughParameters[i];
             context.ExprHostBuilder.ActionDrillThroughParameterStart();
             parameterValue.Initialize(context, queryParam: false);
             parameterValue.ExprHostID = context.ExprHostBuilder.ActionDrillThroughParameterEnd();
         }
     }
     if (m_drillthroughBookmarkLink != null)
     {
         m_drillthroughBookmarkLink.Initialize("BookmarkLink", context);
         context.ExprHostBuilder.ActionDrillThroughBookmarkLink(m_drillthroughBookmarkLink);
     }
     if (m_bookmarkLink != null)
     {
         m_bookmarkLink.Initialize("BookmarkLink", context);
         context.ExprHostBuilder.ActionBookmarkLink(m_bookmarkLink);
     }
     if (m_label != null)
     {
         m_label.Initialize("Label", context);
         context.ExprHostBuilder.GenericLabel(m_label);
     }
     m_exprHostID = context.ExprHostBuilder.ActionEnd();
 }
Example #16
0
 internal override bool Initialize(InitializationContext context)
 {
     context.ObjectType = ObjectType;
     context.ObjectName = m_name;
     m_subReportScope   = context.GetCurrentScope();
     if ((LocationFlags)0 < (context.Location & LocationFlags.InMatrixCellTopLevelItem))
     {
         m_isMatrixCellScope = true;
     }
     if ((LocationFlags)0 < (context.Location & LocationFlags.InDetail))
     {
         m_isDetailScope = true;
         context.SetDataSetDetailUserSortFilter();
     }
     context.ExprHostBuilder.SubreportStart(m_name);
     base.Initialize(context);
     if (m_visibility != null)
     {
         m_visibility.Initialize(context, isContainer: false, tableRowCol: false);
     }
     if (m_parameters != null)
     {
         for (int i = 0; i < m_parameters.Count; i++)
         {
             ParameterValue parameterValue = m_parameters[i];
             context.ExprHostBuilder.SubreportParameterStart();
             parameterValue.Initialize(context, queryParam: false);
             parameterValue.ExprHostID = context.ExprHostBuilder.SubreportParameterEnd();
         }
     }
     if (m_noRows != null)
     {
         m_noRows.Initialize("NoRows", context);
         context.ExprHostBuilder.GenericNoRows(m_noRows);
     }
     base.ExprHostID = context.ExprHostBuilder.SubreportEnd();
     return(false);
 }
Example #17
0
 internal override bool Initialize(InitializationContext context)
 {
     context.ObjectType = ObjectType;
     context.ObjectName = m_name;
     context.ExprHostBuilder.ImageStart(m_name);
     base.Initialize(context);
     if (m_visibility != null)
     {
         m_visibility.Initialize(context, isContainer: false, tableRowCol: false);
     }
     if (m_action != null)
     {
         m_action.Initialize(context);
     }
     if (m_value != null)
     {
         m_value.Initialize("Value", context);
         context.ExprHostBuilder.GenericValue(m_value);
         if (ExpressionInfo.Types.Constant == m_value.Type && m_source == SourceType.External && !context.ReportContext.IsSupportedProtocol(m_value.Value, protocolRestriction: true))
         {
             context.ErrorContext.Register(ProcessingErrorCode.rsUnsupportedProtocol, Severity.Error, ObjectType, m_name, "Value", m_value.Value, "http://, https://, ftp://, file:, mailto:, or news:");
         }
     }
     if (m_MIMEType != null)
     {
         m_MIMEType.Initialize("MIMEType", context);
         context.ExprHostBuilder.ImageMIMEType(m_MIMEType);
     }
     if (SourceType.Embedded == m_source)
     {
         Global.Tracer.Assert(m_value != null);
         PublishingValidator.ValidateEmbeddedImageName(m_value, context.EmbeddedImages, ObjectType, m_name, "Value", context.ErrorContext);
     }
     base.ExprHostID = context.ExprHostBuilder.ImageEnd();
     return(true);
 }
Example #18
0
 internal void Initialize(InitializationContext context)
 {
     if (m_commandText != null)
     {
         m_commandText.Initialize("CommandText", context);
         context.ExprHostBuilder.DataSetQueryCommandText(m_commandText);
     }
     if (m_queryParameters != null)
     {
         ObjectType objectType = context.ObjectType;
         string     objectName = context.ObjectName;
         context.ObjectType = ObjectType.QueryParameter;
         context.ExprHostBuilder.QueryParametersStart();
         for (int i = 0; i < m_queryParameters.Count; i++)
         {
             ParameterValue parameterValue = m_queryParameters[i];
             context.ObjectName = parameterValue.Name;
             parameterValue.Initialize(context, queryParam: true);
         }
         context.ExprHostBuilder.QueryParametersEnd();
         context.ObjectType = objectType;
         context.ObjectName = objectName;
     }
 }
Example #19
0
        internal void Initialize(InitializationContext context)
        {
            Global.Tracer.Assert(m_styleAttributes != null);
            IDictionaryEnumerator enumerator = m_styleAttributes.GetEnumerator();

            while (enumerator.MoveNext())
            {
                string        text          = (string)enumerator.Key;
                AttributeInfo attributeInfo = (AttributeInfo)enumerator.Value;
                Global.Tracer.Assert(text != null);
                Global.Tracer.Assert(attributeInfo != null);
                if (attributeInfo.IsExpression)
                {
                    string name = text;
                    switch (text)
                    {
                    case "BorderColorLeft":
                    case "BorderColorRight":
                    case "BorderColorTop":
                    case "BorderColorBottom":
                        text = "BorderColor";
                        break;

                    case "BorderStyleLeft":
                    case "BorderStyleRight":
                    case "BorderStyleTop":
                    case "BorderStyleBottom":
                        text = "BorderStyle";
                        break;

                    case "BorderWidthLeft":
                    case "BorderWidthRight":
                    case "BorderWidthTop":
                    case "BorderWidthBottom":
                        text = "BorderWidth";
                        break;
                    }
                    Global.Tracer.Assert(m_expressionList != null);
                    ExpressionInfo expressionInfo = m_expressionList[attributeInfo.IntValue];
                    expressionInfo.Initialize(text, context);
                    context.ExprHostBuilder.StyleAttribute(name, expressionInfo);
                }
            }
            AttributeInfo attributeInfo2 = m_styleAttributes["BackgroundImageSource"];

            if (attributeInfo2 != null)
            {
                Global.Tracer.Assert(!attributeInfo2.IsExpression);
                Image.SourceType intValue = (Image.SourceType)attributeInfo2.IntValue;
                if (Image.SourceType.Embedded == intValue)
                {
                    AttributeInfo attributeInfo3 = m_styleAttributes["BackgroundImageValue"];
                    Global.Tracer.Assert(attributeInfo3 != null);
                    PublishingValidator.ValidateEmbeddedImageName(attributeInfo3, context.EmbeddedImages, context.ObjectType, context.ObjectName, "BackgroundImageValue", context.ErrorContext);
                }
                else if (intValue == Image.SourceType.External)
                {
                    AttributeInfo attributeInfo4 = m_styleAttributes["BackgroundImageValue"];
                    Global.Tracer.Assert(attributeInfo4 != null);
                    if (!attributeInfo4.IsExpression)
                    {
                        context.ImageStreamNames[attributeInfo4.Value] = new ImageInfo(context.ObjectName, null);
                    }
                }
            }
            context.CheckInternationalSettings(m_styleAttributes);
        }
 internal virtual bool Initialize(InitializationContext context)
 {
     if (m_top == null)
     {
         m_top      = "0mm";
         m_topValue = 0.0;
     }
     else
     {
         m_topValue = context.ValidateSize(ref m_top, "Top");
     }
     if (m_left == null)
     {
         m_left      = "0mm";
         m_leftValue = 0.0;
     }
     else
     {
         m_leftValue = context.ValidateSize(ref m_left, "Left");
     }
     if (m_parent != null)
     {
         bool flag = true;
         if (m_width == null)
         {
             if ((context.Location & LocationFlags.InMatrixOrTable) == 0)
             {
                 if (ObjectType.Table == context.ObjectType || ObjectType.Matrix == context.ObjectType)
                 {
                     m_width      = "0mm";
                     m_widthValue = 0.0;
                     flag         = false;
                 }
                 else if (ObjectType.PageHeader == context.ObjectType || ObjectType.PageFooter == context.ObjectType)
                 {
                     Report report = m_parent as Report;
                     m_widthValue = report.PageSectionWidth;
                     m_width      = Converter.ConvertSize(m_widthValue);
                 }
                 else
                 {
                     m_widthValue = Math.Round(m_parent.m_widthValue - m_leftValue, Validator.DecimalPrecision);
                     m_width      = Converter.ConvertSize(m_widthValue);
                 }
             }
             else
             {
                 flag = false;
             }
         }
         if (flag)
         {
             m_widthValue = context.ValidateSize(m_width, "Width");
         }
         flag = true;
         if (m_height == null)
         {
             if ((context.Location & LocationFlags.InMatrixOrTable) == 0)
             {
                 if (ObjectType.Table == context.ObjectType || ObjectType.Matrix == context.ObjectType)
                 {
                     m_height      = "0mm";
                     m_heightValue = 0.0;
                     flag          = false;
                 }
                 else
                 {
                     m_heightValue = Math.Round(m_parent.m_heightValue - m_topValue, Validator.DecimalPrecision);
                     m_height      = Converter.ConvertSize(m_heightValue);
                 }
             }
             else
             {
                 flag = false;
             }
         }
         if (flag)
         {
             m_heightValue = context.ValidateSize(m_height, "Height");
         }
     }
     else
     {
         m_widthValue  = context.ValidateSize(ref m_width, "Width");
         m_heightValue = context.ValidateSize(ref m_height, "Height");
     }
     if ((context.Location & LocationFlags.InMatrixOrTable) == 0)
     {
         ValidateParentBoundaries(context, context.ObjectType, context.ObjectName);
     }
     if (m_styleClass != null)
     {
         m_styleClass.Initialize(context);
     }
     if (m_label != null)
     {
         m_label.Initialize("Label", context);
         context.ExprHostBuilder.GenericLabel(m_label);
     }
     if (m_bookmark != null)
     {
         m_bookmark.Initialize("Bookmark", context);
         context.ExprHostBuilder.ReportItemBookmark(m_bookmark);
     }
     if (m_toolTip != null)
     {
         m_toolTip.Initialize("ToolTip", context);
         context.ExprHostBuilder.ReportItemToolTip(m_toolTip);
     }
     if (m_customProperties != null)
     {
         m_customProperties.Initialize(null, isCustomProperty: true, context);
     }
     DataRendererInitialize(context);
     return(false);
 }
Example #21
0
 internal override bool Initialize(InitializationContext context)
 {
     context.Location   = LocationFlags.None;
     context.ObjectType = ObjectType;
     context.ObjectName = null;
     base.Initialize(context);
     if (m_language != null)
     {
         m_language.Initialize("Language", context);
         context.ExprHostBuilder.ReportLanguage(m_language);
     }
     context.ReportDataElementStyleAttribute = m_dataElementStyleAttribute;
     m_pageHeightValue = context.ValidateSize(ref m_pageHeight, "PageHeight");
     if (m_pageHeightValue <= 0.0)
     {
         context.ErrorContext.Register(ProcessingErrorCode.rsInvalidSize, Severity.Error, context.ObjectType, context.ObjectName, "PageHeight", m_pageHeightValue.ToString(CultureInfo.InvariantCulture));
     }
     m_pageWidthValue = context.ValidateSize(ref m_pageWidth, "PageWidth");
     if (m_pageWidthValue <= 0.0)
     {
         context.ErrorContext.Register(ProcessingErrorCode.rsInvalidSize, Severity.Error, context.ObjectType, context.ObjectName, "PageWidth", m_pageWidthValue.ToString(CultureInfo.InvariantCulture));
     }
     if (m_interactiveHeight != null)
     {
         m_interactiveHeightValue = context.ValidateSize(ref m_interactiveHeight, restrictMaxValue: false, "InteractiveHeight");
         if (0.0 == m_interactiveHeightValue)
         {
             m_interactiveHeightValue = double.MaxValue;
         }
         else if (m_interactiveHeightValue < 0.0)
         {
             context.ErrorContext.Register(ProcessingErrorCode.rsInvalidSize, Severity.Error, context.ObjectType, context.ObjectName, "InteractiveHeight", m_interactiveHeightValue.ToString(CultureInfo.InvariantCulture));
         }
     }
     if (m_interactiveWidth != null)
     {
         m_interactiveWidthValue = context.ValidateSize(ref m_interactiveWidth, restrictMaxValue: false, "InteractiveWidth");
         if (0.0 == m_interactiveWidthValue)
         {
             m_interactiveWidthValue = double.MaxValue;
         }
         else if (m_interactiveWidthValue < 0.0)
         {
             context.ErrorContext.Register(ProcessingErrorCode.rsInvalidSize, Severity.Error, context.ObjectType, context.ObjectName, "InteractiveWidth", m_interactiveWidthValue.ToString(CultureInfo.InvariantCulture));
         }
     }
     m_leftMarginValue    = context.ValidateSize(ref m_leftMargin, "LeftMargin");
     m_rightMarginValue   = context.ValidateSize(ref m_rightMargin, "RightMargin");
     m_topMarginValue     = context.ValidateSize(ref m_topMargin, "TopMargin");
     m_bottomMarginValue  = context.ValidateSize(ref m_bottomMargin, "BottomMargin");
     m_columnSpacingValue = context.ValidateSize(ref m_columnSpacing, "ColumnSpacing");
     if (m_dataSources != null)
     {
         for (int i = 0; i < m_dataSources.Count; i++)
         {
             Global.Tracer.Assert(m_dataSources[i] != null);
             m_dataSources[i].Initialize(context);
         }
     }
     BodyInitialize(context);
     PageHeaderFooterInitialize(context);
     if (context.ExprHostBuilder.CustomCode)
     {
         context.ExprHostBuilder.CustomCodeProxyStart();
         if (m_codeClasses != null && m_codeClasses.Count > 0)
         {
             for (int num = m_codeClasses.Count - 1; num >= 0; num--)
             {
                 CodeClass codeClass = m_codeClasses[num];
                 context.ExprHostBuilder.CustomCodeClassInstance(codeClass.ClassName, codeClass.InstanceName, num);
             }
         }
         if (m_code != null && m_code.Length > 0)
         {
             context.ExprHostBuilder.ReportCode(m_code);
         }
         context.ExprHostBuilder.CustomCodeProxyEnd();
     }
     return(false);
 }
Example #22
0
 internal override bool Initialize(InitializationContext context)
 {
     context.ObjectType = ObjectType;
     context.ObjectName = m_name;
     context.ExprHostBuilder.TextBoxStart(m_name);
     base.Initialize(context);
     if (m_visibility != null)
     {
         m_visibility.Initialize(context, isContainer: false, tableRowCol: false);
     }
     if (m_value != null)
     {
         m_value.Initialize("Value", context);
         context.ExprHostBuilder.GenericValue(m_value);
     }
     if (m_action != null)
     {
         m_action.Initialize(context);
     }
     if (m_initialToggleState != null)
     {
         m_initialToggleState.Initialize("InitialState", context);
         context.ExprHostBuilder.TextBoxToggleImageInitialState(m_initialToggleState);
     }
     if (m_hideDuplicates != null)
     {
         context.ValidateHideDuplicateScope(m_hideDuplicates, this);
     }
     context.RegisterSender(this);
     if (m_userSort != null)
     {
         context.RegisterSortFilterTextbox(this);
         m_textboxScope = context.GetCurrentScope();
         if ((LocationFlags)0 < (context.Location & LocationFlags.InMatrixCellTopLevelItem))
         {
             m_isMatrixCellScope = true;
         }
         if ((LocationFlags)0 < (context.Location & LocationFlags.InDetail))
         {
             m_isDetailScope = true;
             context.SetDataSetDetailUserSortFilter();
         }
         string sortExpressionScopeString = m_userSort.SortExpressionScopeString;
         if (sortExpressionScopeString == null)
         {
             context.TextboxWithDetailSortExpressionAdd(this);
         }
         else if (context.IsScope(sortExpressionScopeString))
         {
             if (context.IsCurrentScope(sortExpressionScopeString) && !m_isMatrixCellScope)
             {
                 m_userSort.SortExpressionScope = context.GetSortFilterScope(sortExpressionScopeString);
                 InitializeSortExpression(context, needsExplicitAggregateScope: false);
             }
             else if (context.IsAncestorScope(sortExpressionScopeString, (LocationFlags)0 < (context.Location & LocationFlags.InMatrixGroupHeader), m_isMatrixCellScope))
             {
                 context.ErrorContext.Register(ProcessingErrorCode.rsInvalidExpressionScope, Severity.Error, context.ObjectType, context.ObjectName, "SortExpressionScope", sortExpressionScopeString);
             }
             else
             {
                 context.RegisterUserSortInnerScope(this);
             }
         }
         else
         {
             context.ErrorContext.Register(ProcessingErrorCode.rsNonExistingScope, Severity.Error, context.ObjectType, context.ObjectName, "SortExpressionScope", sortExpressionScopeString);
         }
         string sortTargetString = m_userSort.SortTargetString;
         if (sortTargetString != null)
         {
             if (context.IsScope(sortTargetString))
             {
                 if (!context.IsCurrentScope(sortTargetString) && !context.IsAncestorScope(sortTargetString, (LocationFlags)0 < (context.Location & LocationFlags.InMatrixGroupHeader), checkAllGroupingScopes: false) && !context.IsPeerScope(sortTargetString))
                 {
                     context.ErrorContext.Register(ProcessingErrorCode.rsInvalidTargetScope, Severity.Error, context.ObjectType, context.ObjectName, "SortTarget", sortTargetString);
                 }
             }
             else
             {
                 context.ErrorContext.Register(ProcessingErrorCode.rsNonExistingScope, Severity.Error, context.ObjectType, context.ObjectName, "SortTarget", sortTargetString);
             }
         }
         else if (context.IsReportTopLevelScope())
         {
             context.ErrorContext.Register(ProcessingErrorCode.rsInvalidOmittedTargetScope, Severity.Error, context.ObjectType, context.ObjectName, "SortTarget");
         }
     }
     base.ExprHostID = context.ExprHostBuilder.TextBoxEnd();
     return(true);
 }