コード例 #1
0
        public void Add(ReportItemList collection, int collectionIndex, bool sortVertically)
        {
            Global.Tracer.Assert(null != collection);
            ReportItem reportItem = collection[collectionIndex];
            int        num        = 0;

            while (num < base.Count)
            {
                if (sortVertically && reportItem.AbsoluteTopValue > collection[this[num]].AbsoluteTopValue)
                {
                    num++;
                }
                else
                {
                    if (sortVertically)
                    {
                        break;
                    }
                    if (!(reportItem.AbsoluteLeftValue > collection[this[num]].AbsoluteLeftValue))
                    {
                        break;
                    }
                    num++;
                }
            }
            base.Insert(num, collectionIndex);
        }
コード例 #2
0
 public void AddReportItemWithHideDuplicates(ReportItem reportItem)
 {
     if (this.m_reportItemsWithHideDuplicates == null)
     {
         this.m_reportItemsWithHideDuplicates = new ReportItemList();
     }
     this.m_reportItemsWithHideDuplicates.Add(reportItem);
 }
コード例 #3
0
 public ReportItemCollection(int id, bool normal)
     : base(id)
 {
     this.m_runningValues = new RunningValueInfoList();
     this.m_normal        = normal;
     this.m_unpopulated   = true;
     this.m_entries       = new ReportItemList();
 }
コード例 #4
0
 public static NonComputedUniqueNames[] CreateNonComputedUniqueNames(ReportProcessing.ProcessingContext pc, ReportItemCollection reportItemsDef)
 {
     if (reportItemsDef != null && pc != 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] = NonComputedUniqueNames.CreateNonComputedUniqueNames(pc, nonComputedReportItems[i]);
         }
         return(array);
     }
     return(null);
 }
コード例 #5
0
        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);
        }
コード例 #6
0
        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;
                }
            }
        }