Exemple #1
0
        internal override object PublishClone(AutomaticSubtotalContext context)
        {
            ReportItem reportItem = (ReportItem)base.PublishClone(context);

            reportItem.m_name = context.CreateUniqueReportItemName(m_name, m_isClone);
            if (m_styleClass != null)
            {
                reportItem.m_styleClass = (Style)m_styleClass.PublishClone(context);
            }
            if (m_top != null)
            {
                reportItem.m_top = (string)m_top.Clone();
            }
            if (m_left != null)
            {
                reportItem.m_left = (string)m_left.Clone();
            }
            if (m_height != null)
            {
                reportItem.m_height = (string)m_height.Clone();
            }
            if (m_width != null)
            {
                reportItem.m_width = (string)m_width.Clone();
            }
            if (m_toolTip != null)
            {
                reportItem.m_toolTip = (ExpressionInfo)m_toolTip.PublishClone(context);
            }
            if (m_visibility != null)
            {
                reportItem.m_visibility = (Visibility)m_visibility.PublishClone(context, isSubtotalMember: false);
            }
            reportItem.m_documentMapLabel = null;
            reportItem.m_bookmark         = null;
            if (m_dataElementName != null)
            {
                reportItem.m_dataElementName = (string)m_dataElementName.Clone();
            }
            if (m_repeatWith != null)
            {
                context.AddReportItemWithRepeatWithToUpdate(reportItem);
                reportItem.m_repeatWith = (string)m_repeatWith.Clone();
            }
            if (m_customProperties != null)
            {
                reportItem.m_customProperties = new DataValueList(m_customProperties.Count);
                {
                    foreach (DataValue customProperty in m_customProperties)
                    {
                        reportItem.m_customProperties.Add((DataValue)customProperty.PublishClone(context));
                    }
                    return(reportItem);
                }
            }
            return(reportItem);
        }
        internal object PublishClone(AutomaticSubtotalContext context, bool isClonedDynamic)
        {
            TablixHeader tablixHeader = (TablixHeader)base.PublishClone(context);

            if (m_size != null)
            {
                tablixHeader.m_size = (string)m_size.Clone();
            }
            if (m_cellContents != null)
            {
                if (isClonedDynamic)
                {
                    ExpressionInfo meDotValueExpression = null;
                    Rectangle      rectangle            = new Rectangle(context.GenerateID(), context.GenerateID(), context.CurrentDataRegion);
                    rectangle.Name = context.CreateUniqueReportItemName(m_cellContents.Name, emptyRectangle: true, isClone: false);
                    Style styleClass = m_cellContents.StyleClass;
                    if (styleClass != null)
                    {
                        Style    style = new Style(ConstructionPhase.Publishing);
                        string[] stylesForEmptyRectangleInSubtotals = m_StylesForEmptyRectangleInSubtotals;
                        foreach (string name in stylesForEmptyRectangleInSubtotals)
                        {
                            AddAttribute(context, styleClass, style, name, meDotValueExpression);
                        }
                        rectangle.StyleClass = style;
                    }
                    tablixHeader.m_cellContents = rectangle;
                }
                else
                {
                    tablixHeader.m_cellContents = (ReportItem)m_cellContents.PublishClone(context);
                    if (m_altCellContents != null)
                    {
                        Global.Tracer.Assert(tablixHeader.m_cellContents is CustomReportItem);
                        tablixHeader.m_altCellContents = (ReportItem)m_altCellContents.PublishClone(context);
                        ((CustomReportItem)tablixHeader.m_cellContents).AltReportItem = tablixHeader.m_altCellContents;
                    }
                }
            }
            return(tablixHeader);
        }