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

            context.AddReportItemCollection(reportItemCollection);
            if (m_entries != null)
            {
                CustomReportItem customReportItem = null;
                reportItemCollection.m_entries = new List <ReportItem>();
                foreach (ReportItem entry in m_entries)
                {
                    ReportItem reportItem = (ReportItem)entry.PublishClone(context);
                    reportItemCollection.m_entries.Add(reportItem);
                    if (reportItem is CustomReportItem)
                    {
                        Global.Tracer.Assert(customReportItem == null, "(lastCriPublishClone == null)");
                        customReportItem = (CustomReportItem)reportItem;
                    }
                    else if (customReportItem != null)
                    {
                        customReportItem.AltReportItem = reportItem;
                        customReportItem = null;
                    }
                }
                Global.Tracer.Assert(customReportItem == null, "(lastCriPublishClone == null)");
            }
            if (m_linkToChildName != null)
            {
                reportItemCollection.m_linkToChildName = context.GetNewReportItemName(m_linkToChildName);
            }
            return(reportItemCollection);
        }