public void AddCustomRenderItem(ReportItem reportItem) { Global.Tracer.Assert(null != reportItem, "(null != reportItem)"); this.m_unpopulated = false; if (this.m_sortedReportItemList == null) { this.m_nonComputedReportItems = new List <ReportItem>(); this.m_computedReportItems = new List <ReportItem>(); this.m_sortedReportItemList = new List <ReportItemIndexer>(); } ReportItemIndexer item = default(ReportItemIndexer); if (reportItem.Computed) { this.m_computedReportItems.Add(reportItem); item.Index = this.m_computedReportItems.Count - 1; } else { this.m_nonComputedReportItems.Add(reportItem); item.Index = this.m_nonComputedReportItems.Count - 1; } item.IsComputed = reportItem.Computed; this.m_sortedReportItemList.Add(item); }
public void GetReportItem(int index, out bool computed, out int internalIndex, out ReportItem reportItem) { Global.Tracer.Assert(!this.m_unpopulated, "(!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 Populate(ErrorContext errorContext) { Global.Tracer.Assert(this.m_unpopulated, "(m_unpopulated)"); Global.Tracer.Assert(null != this.m_entries, "(null != 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 List <ReportItem>(); this.m_computedReportItems = new List <ReportItem>(); this.m_sortedReportItemList = new List <ReportItemIndexer>(); List <CustomReportItem> list = new List <CustomReportItem>(); for (int i = 0; i < this.m_entries.Count; i++) { ReportItem reportItem = this.m_entries[i]; Global.Tracer.Assert(null != reportItem, "(null != item)"); if (reportItem.IsDataRegion) { hashtable[reportItem.Name] = reportItem; } if (reportItem.ObjectType == AspNetCore.ReportingServices.ReportProcessing.ObjectType.CustomReportItem) { list.Add((CustomReportItem)reportItem); } ReportItemIndexer item = default(ReportItemIndexer); if (reportItem.Computed) { this.m_computedReportItems.Add(reportItem); item.Index = this.m_computedReportItems.Count - 1; } else { this.m_nonComputedReportItems.Add(reportItem); item.Index = this.m_nonComputedReportItems.Count - 1; } item.IsComputed = reportItem.Computed; this.m_sortedReportItemList.Add(item); } if (list.Count > 0) { bool[] array = new bool[this.m_sortedReportItemList.Count]; foreach (CustomReportItem item2 in list) { int num3 = item2.AltReportItemIndexInParentCollectionDef = this.m_entries.IndexOf(item2.AltReportItem); array[num3] = true; } this.m_romIndexMap = new List <int>(this.m_sortedReportItemList.Count - list.Count); for (int j = 0; j < this.m_sortedReportItemList.Count; j++) { if (!array[j]) { this.m_romIndexMap.Add(j); } } Global.Tracer.Assert(this.m_romIndexMap.Count + list.Count == this.m_sortedReportItemList.Count); } } this.m_unpopulated = false; this.m_entries = null; for (int k = 0; k < this.Count; k++) { ReportItem reportItem2 = this[k]; Global.Tracer.Assert(null != reportItem2, "(null != item)"); if (reportItem2.RepeatWith != null) { if (reportItem2.IsDataRegion || 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 List <int>(); } dataRegion.RepeatSiblings.Add((this.m_romIndexMap == null) ? k : this.m_romIndexMap.IndexOf(k)); } } if (this.m_linkToChildName != null && num < 0 && reportItem2.Name.Equals(this.m_linkToChildName, StringComparison.Ordinal)) { num = k; ((Rectangle)reportItem2.Parent).LinkToChild = k; } } }