public void GetReportItem(int index, out bool computed, out int internalIndex, out ReportItem reportItem)
 {
     Global.Tracer.Assert(!this.m_unpopulated);
     computed      = false;
     internalIndex = -1;
     reportItem    = null;
     if (this.m_sortedReportItemList != null && 0 <= index && index < this.m_sortedReportItemList.Count)
     {
         ReportItemIndexer reportItemIndexer = this.m_sortedReportItemList[index];
         if (0 <= reportItemIndexer.Index)
         {
             computed      = reportItemIndexer.IsComputed;
             internalIndex = reportItemIndexer.Index;
             reportItem    = this.InternalGet(internalIndex, computed);
         }
     }
 }
        public void AddCustomRenderItem(ReportItem reportItem)
        {
            Global.Tracer.Assert(null != reportItem);
            this.m_unpopulated = false;
            if (this.m_sortedReportItemList == null)
            {
                this.m_nonComputedReportItems = new ReportItemList();
                this.m_computedReportItems    = new ReportItemList();
                this.m_sortedReportItemList   = new ReportItemIndexerList();
            }
            ReportItemIndexer reportItemIndexer = default(ReportItemIndexer);

            if (reportItem.Computed)
            {
                reportItemIndexer.Index = this.m_computedReportItems.Add(reportItem);
            }
            else
            {
                reportItemIndexer.Index = this.m_nonComputedReportItems.Add(reportItem);
            }
            reportItemIndexer.IsComputed = reportItem.Computed;
            this.m_sortedReportItemList.Add(reportItemIndexer);
        }
        public void Populate(ErrorContext errorContext)
        {
            Global.Tracer.Assert(this.m_unpopulated);
            Global.Tracer.Assert(null != this.m_entries);
            Hashtable hashtable = new Hashtable();
            int       num       = -1;

            if (0 < this.m_entries.Count)
            {
                if (this.m_normal)
                {
                    this.m_entries.Sort();
                }
                this.m_nonComputedReportItems = new ReportItemList();
                this.m_computedReportItems    = new ReportItemList();
                this.m_sortedReportItemList   = new ReportItemIndexerList();
                for (int i = 0; i < this.m_entries.Count; i++)
                {
                    ReportItem reportItem = this.m_entries[i];
                    Global.Tracer.Assert(null != reportItem);
                    if (reportItem is DataRegion)
                    {
                        hashtable[reportItem.Name] = reportItem;
                    }
                    ReportItemIndexer reportItemIndexer = default(ReportItemIndexer);
                    if (reportItem.Computed)
                    {
                        reportItemIndexer.Index = this.m_computedReportItems.Add(reportItem);
                    }
                    else
                    {
                        reportItemIndexer.Index = this.m_nonComputedReportItems.Add(reportItem);
                    }
                    reportItemIndexer.IsComputed = reportItem.Computed;
                    this.m_sortedReportItemList.Add(reportItemIndexer);
                }
            }
            this.m_unpopulated = false;
            this.m_entries     = null;
            for (int j = 0; j < this.Count; j++)
            {
                ReportItem reportItem2 = this[j];
                Global.Tracer.Assert(null != reportItem2);
                if (reportItem2.RepeatWith != null)
                {
                    if (reportItem2 is DataRegion || reportItem2 is SubReport || (reportItem2 is Rectangle && ((Rectangle)reportItem2).ContainsDataRegionOrSubReport()))
                    {
                        errorContext.Register(ProcessingErrorCode.rsInvalidRepeatWith, Severity.Error, reportItem2.ObjectType, reportItem2.Name, "RepeatWith");
                    }
                    if (!this.m_normal || !hashtable.ContainsKey(reportItem2.RepeatWith))
                    {
                        errorContext.Register(ProcessingErrorCode.rsRepeatWithNotPeerDataRegion, Severity.Error, reportItem2.ObjectType, reportItem2.Name, "RepeatWith", reportItem2.RepeatWith);
                    }
                    DataRegion dataRegion = (DataRegion)hashtable[reportItem2.RepeatWith];
                    if (dataRegion != null)
                    {
                        if (dataRegion.RepeatSiblings == null)
                        {
                            dataRegion.RepeatSiblings = new IntList();
                        }
                        dataRegion.RepeatSiblings.Add(j);
                    }
                }
                if (this.m_linkToChildName != null && num < 0 && reportItem2.Name.Equals(this.m_linkToChildName, StringComparison.Ordinal))
                {
                    num = j;
                    ((Rectangle)reportItem2.Parent).LinkToChild = j;
                }
            }
        }