Пример #1
0
 internal ReportItemCollection(int id, bool normal)
     : base(id)
 {
     m_runningValues = new RunningValueInfoList();
     m_normal        = normal;
     m_unpopulated   = true;
     m_entries       = new ReportItemList();
 }
Пример #2
0
 internal void AddReportItemWithHideDuplicates(ReportItem reportItem)
 {
     if (m_reportItemsWithHideDuplicates == null)
     {
         m_reportItemsWithHideDuplicates = new ReportItemList();
     }
     m_reportItemsWithHideDuplicates.Add(reportItem);
 }
        public void Add(ReportItemList collection, int collectionIndex, bool sortVertically)
        {
            Global.Tracer.Assert(collection != null);
            ReportItem reportItem = collection[collectionIndex];
            int        num        = 0;

            while (num < base.Count)
            {
                if (sortVertically && reportItem.AbsoluteTopValue > collection[this[num]].AbsoluteTopValue)
                {
                    num++;
                    continue;
                }
                if (sortVertically || !(reportItem.AbsoluteLeftValue > collection[this[num]].AbsoluteLeftValue))
                {
                    break;
                }
                num++;
            }
            base.Insert(num, collectionIndex);
        }
Пример #4
0
        internal void AddCustomRenderItem(ReportItem reportItem)
        {
            Global.Tracer.Assert(reportItem != null);
            m_unpopulated = false;
            if (m_sortedReportItemList == null)
            {
                m_nonComputedReportItems = new ReportItemList();
                m_computedReportItems    = new ReportItemList();
                m_sortedReportItemList   = new ReportItemIndexerList();
            }
            ReportItemIndexer reportItemIndexer = default(ReportItemIndexer);

            if (reportItem.Computed)
            {
                reportItemIndexer.Index = m_computedReportItems.Add(reportItem);
            }
            else
            {
                reportItemIndexer.Index = m_nonComputedReportItems.Add(reportItem);
            }
            reportItemIndexer.IsComputed = reportItem.Computed;
            m_sortedReportItemList.Add(reportItemIndexer);
        }
        internal static NonComputedUniqueNames[] CreateNonComputedUniqueNames(ReportProcessing.ProcessingContext pc, ReportItemCollection reportItemsDef)
        {
            if (reportItemsDef == null || pc == null)
            {
                return(null);
            }
            ReportItemList nonComputedReportItems = reportItemsDef.NonComputedReportItems;

            if (nonComputedReportItems == null)
            {
                return(null);
            }
            if (nonComputedReportItems.Count == 0)
            {
                return(null);
            }
            NonComputedUniqueNames[] array = new NonComputedUniqueNames[nonComputedReportItems.Count];
            for (int i = 0; i < nonComputedReportItems.Count; i++)
            {
                array[i] = CreateNonComputedUniqueNames(pc, nonComputedReportItems[i]);
            }
            return(array);
        }
Пример #6
0
        internal void Populate(ErrorContext errorContext)
        {
            Global.Tracer.Assert(m_unpopulated);
            Global.Tracer.Assert(m_entries != null);
            Hashtable hashtable = new Hashtable();
            int       num       = -1;

            if (0 < m_entries.Count)
            {
                if (m_normal)
                {
                    m_entries.Sort();
                }
                m_nonComputedReportItems = new ReportItemList();
                m_computedReportItems    = new ReportItemList();
                m_sortedReportItemList   = new ReportItemIndexerList();
                for (int i = 0; i < m_entries.Count; i++)
                {
                    ReportItem reportItem = m_entries[i];
                    Global.Tracer.Assert(reportItem != null);
                    if (reportItem is DataRegion)
                    {
                        hashtable[reportItem.Name] = reportItem;
                    }
                    ReportItemIndexer reportItemIndexer = default(ReportItemIndexer);
                    if (reportItem.Computed)
                    {
                        reportItemIndexer.Index = m_computedReportItems.Add(reportItem);
                    }
                    else
                    {
                        reportItemIndexer.Index = m_nonComputedReportItems.Add(reportItem);
                    }
                    reportItemIndexer.IsComputed = reportItem.Computed;
                    m_sortedReportItemList.Add(reportItemIndexer);
                }
            }
            m_unpopulated = false;
            m_entries     = null;
            for (int j = 0; j < Count; j++)
            {
                ReportItem reportItem2 = this[j];
                Global.Tracer.Assert(reportItem2 != null);
                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 (!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 (m_linkToChildName != null && num < 0 && reportItem2.Name.Equals(m_linkToChildName, StringComparison.Ordinal))
                {
                    num = j;
                    ((Rectangle)reportItem2.Parent).LinkToChild = j;
                }
            }
        }