public void NextPage(RPLWriter rplWriter, int totalPages) { this.WriteStartItemToStream(rplWriter); double num = 0.0; ReportSection reportSection = this.m_sections[0]; int count = this.m_sections.Count; double num2 = 0.0; List <ReportSection> list = new List <ReportSection>(); List <ReportSection> list2 = new List <ReportSection>(); bool isFirstSectionOnPage = true; RoundedDouble roundedDouble = new RoundedDouble(this.m_pageContext.UsablePageHeight); for (int i = 0; i < this.m_sections.Count; i++) { ReportSection reportSection2 = this.m_sections[i]; ReportSection nextSection = null; if (i < this.m_sections.Count - 1) { nextSection = this.m_sections[i + 1]; } double num3 = reportSection2.NextPage(rplWriter, this.m_pageContext.PageNumber, totalPages, num, roundedDouble.Value - num, nextSection, isFirstSectionOnPage); if (num3 > 0.0) { num += num3; list2.Add(reportSection2); } num2 = Math.Max(num2, reportSection2.LeftEdge); if (reportSection2.Done) { list.Add(reportSection2); } if (roundedDouble == num) { break; } isFirstSectionOnPage = false; } if (num2 == 0.0) { foreach (ReportSection item in list) { this.m_sections.Remove(item); } } if (rplWriter != null) { reportSection.WriteDelayedSectionHeader(rplWriter, this.Done); this.WriteEndItemToStream(rplWriter, list2); } if (this.m_pageContext.PropertyCacheState == PageContext.CacheState.RPLStream) { this.m_pageContext.ItemPropsStart = null; this.m_pageContext.SharedImages = null; } }
private void HorizontalDependecy() { PageItem pageItem = null; ItemSizes itemSizes = null; PageItem pageItem2 = null; ItemSizes itemSizes2 = null; RoundedDouble roundedDouble = new RoundedDouble(-1.0); RoundedDouble roundedDouble2 = new RoundedDouble(0.0); for (int i = 0; i < this.m_children.Length; i++) { pageItem = this.m_children[this.m_indexesLeftToRight[i]]; itemSizes = pageItem.ItemPageSizes; roundedDouble.Value = -1.0; roundedDouble2.Value = itemSizes.Right; for (int j = i + 1; j < this.m_children.Length; j++) { pageItem2 = this.m_children[this.m_indexesLeftToRight[j]]; itemSizes2 = pageItem2.ItemPageSizes; if (roundedDouble >= 0.0 && roundedDouble <= itemSizes2.Left) { break; } if (roundedDouble2 <= itemSizes2.Left) { if (pageItem2.PageItemsLeft == null) { pageItem2.PageItemsLeft = new List <int>(); } pageItem2.PageItemsLeft.Add(this.m_indexesLeftToRight[i]); if (roundedDouble < 0.0 || roundedDouble > itemSizes2.Right) { roundedDouble.Value = itemSizes2.Right; } } } } }
private void VerticalDependency() { PageItem pageItem = null; ItemSizes itemSizes = null; PageItem pageItem2 = null; ItemSizes itemSizes2 = null; RoundedDouble roundedDouble = new RoundedDouble(-1.0); RoundedDouble roundedDouble2 = new RoundedDouble(0.0); for (int i = 0; i < this.m_children.Length; i++) { pageItem = this.m_children[i]; itemSizes = pageItem.ItemPageSizes; roundedDouble2.Value = itemSizes.Bottom; roundedDouble.Value = -1.0; for (int j = i + 1; j < this.m_children.Length; j++) { pageItem2 = this.m_children[j]; itemSizes2 = pageItem2.ItemPageSizes; if (roundedDouble >= 0.0 && roundedDouble <= itemSizes2.Top) { break; } if (roundedDouble2 <= itemSizes2.Top) { if (pageItem2.PageItemsAbove == null) { pageItem2.PageItemsAbove = new List <int>(); } pageItem2.PageItemsAbove.Add(i); if (roundedDouble < 0.0 || roundedDouble > itemSizes2.Bottom) { roundedDouble.Value = itemSizes2.Bottom; } } } } }
public double NextPage(RPLWriter rplWriter, int pageNumber, int totalPages, double top, double availableHeight, ReportSection nextSection, bool isFirstSectionOnPage) { double num = 0.0; bool flag = nextSection == null; if (!flag) { SectionPaginationSettings sectionPaginationSettings = nextSection.SectionPaginationSettings; num = 12.699999809265137 + sectionPaginationSettings.FooterHeight; PageSection pageHeader = nextSection.ROMReportSection.Page.PageHeader; if (pageHeader != null && pageHeader.PrintBetweenSections) { num += sectionPaginationSettings.HeaderHeight; } } double num2 = 0.0; PageSection pageHeader2 = this.m_reportSection.Page.PageHeader; PageSection pageFooter = this.m_reportSection.Page.PageFooter; bool flag2 = pageHeader2 != null && pageHeader2.PrintBetweenSections; bool flag3 = pageFooter != null && pageFooter.PrintBetweenSections; this.m_needsHeaderHeight = (isFirstSectionOnPage ? (pageHeader2 != null) : flag2); if (this.m_needsHeaderHeight) { num2 += this.m_sectionPageSettings.HeaderHeight; availableHeight -= num2; } if (pageFooter != null) { availableHeight -= this.m_sectionPageSettings.FooterHeight; } bool flag4 = false; bool flag5 = false; this.m_reportSection.SetPage(this.m_pageContext.PageNumberRegion, this.m_pageContext.Common.GetTotalPagesRegion(pageNumber), pageNumber, totalPages); bool needsReportItemsOnPage = this.m_reportSection.NeedsReportItemsOnPage; bool flag6 = this.m_pageContext.PropertyCacheState != PageContext.CacheState.CountPages; this.m_pageContext.EvaluatePageHeaderFooter = false; if (needsReportItemsOnPage && flag6) { if (flag2 && !isFirstSectionOnPage) { goto IL_015f; } if (this.HasHeaderOnPage(pageNumber, totalPages)) { goto IL_015f; } goto IL_0162; } goto IL_018a; IL_018a: if (rplWriter != null) { this.m_columns = new List <ColumnDetail>(this.m_sectionPageSettings.Columns); this.WriteStartItemToStream(rplWriter); } long num3 = 0L; if (!this.Done) { double columnWidth = this.m_sectionPageSettings.ColumnWidth; this.m_pageContext.Common.Pagination.CurrentColumnWidth = columnWidth; this.m_columnHeight = availableHeight; this.m_pageContext.Common.Pagination.CurrentColumnHeight = this.m_columnHeight; int num4 = 0; int columns = this.m_sectionPageSettings.Columns; RoundedDouble roundedDouble = new RoundedDouble(this.m_topEdge); RoundedDouble roundedDouble2 = new RoundedDouble(this.m_leftEdge); this.m_pageContext.VerticalPageNumber = this.m_verticalPageNumber; while (num4 < columns) { bool flag7 = false; if (this.m_leftEdge == 0.0) { if (this.m_pageContext.TextBoxDuplicates != null) { this.m_pageContext.TextBoxDuplicates = null; this.m_reportBody.ResolveDuplicates(this.m_pageContext, this.m_topEdge, null, false); } this.m_reportBody.CalculateVertical(this.m_pageContext, this.m_topEdge, this.m_topEdge + availableHeight, null, new List <PageItem>(), ref flag7, false); this.m_verticalPageNumber++; this.m_pageContext.VerticalPageNumber = this.m_verticalPageNumber; } flag7 = false; this.m_reportBody.CalculateHorizontal(this.m_pageContext, this.m_leftEdge, this.m_leftEdge + columnWidth, null, new List <PageItem>(), ref flag7, false); num3 = this.m_pageContext.PropertyCacheWriter.BaseStream.Position; this.m_reportBody.AddToPage(rplWriter, this.m_pageContext, this.m_leftEdge, this.m_topEdge, this.m_leftEdge + columnWidth, this.m_topEdge + availableHeight, PageItem.RepeatState.None); if (rplWriter != null) { rplWriter.RegisterSectionItemizedData(); } this.m_pageContext.PropertyCacheWriter.BaseStream.Seek(num3, SeekOrigin.Begin); if (rplWriter != null) { this.m_columns.Add(new ColumnDetail(0.0 - this.m_leftEdge, 0.0 - this.m_topEdge, this.m_reportBody)); } this.m_leftEdge += columnWidth; roundedDouble2.Value = this.m_leftEdge; if (num4 == 0 && this.m_reportBody.ItemPageSizes.Bottom - this.m_topEdge < availableHeight) { this.m_columnHeight = this.m_reportBody.ItemPageSizes.Bottom - this.m_topEdge; } if (roundedDouble2 >= this.m_reportBody.ItemPageSizes.Width) { this.m_leftEdge = 0.0; this.m_topEdge += availableHeight; roundedDouble.Value = this.m_topEdge; this.m_reportBody.ResetHorizontal(true, null); this.m_pageContext.Common.PaginatingHorizontally = false; } else { this.m_pageContext.Common.PaginatingHorizontally = true; } num4++; if (roundedDouble >= this.m_reportBody.ItemPageSizes.Bottom) { this.m_reportBody = null; this.m_topEdge = 0.0; this.m_leftEdge = 0.0; break; } } } double num5 = availableHeight - this.m_columnHeight; if (this.Done && !flag && pageFooter != null && !flag3) { num5 += this.m_sectionPageSettings.FooterHeight; } bool flag8 = false; if (num5 < num || flag) { this.m_columnHeight = availableHeight; flag8 = true; num2 += this.m_sectionPageSettings.FooterHeight; } else if (flag3) { num2 += this.m_sectionPageSettings.FooterHeight; } this.m_itemPageSizes.Height = num2 + this.m_columnHeight; this.m_itemPageSizes.Top = top; this.WriteColumns(rplWriter); this.m_columns = null; if (this.Done && flag && totalPages == 0) { totalPages = pageNumber; } if (flag6) { flag4 = ((!isFirstSectionOnPage) ? flag2 : this.HasHeaderOnPage(pageNumber, totalPages)); flag5 = ((!flag8) ? flag3 : this.HasFooterOnPage(pageNumber, totalPages)); } if (flag4 || flag5) { this.m_pageContext.Common.CheckPageNameChanged(); this.m_reportSection.SetPageName(this.m_pageContext.PageName); this.m_reportSection.GetPageSections(); if (flag4 && !this.IsHeaderUnknown(isFirstSectionOnPage, pageNumber, totalPages)) { this.RenderHeader(rplWriter); } else { this.m_header = null; flag4 = false; } if (flag5) { this.RenderFooter(rplWriter); } else { this.m_footer = null; } if (rplWriter != null && (flag4 || flag5)) { rplWriter.RegisterSectionHeaderFooter(); } } if (!this.IsHeaderUnknown(isFirstSectionOnPage, pageNumber, totalPages)) { this.WriteEndItemToStream(rplWriter); this.m_wroteEndToStream = true; } else { this.m_wroteEndToStream = false; } if (rplWriter != null) { rplWriter.RegisterPageItemizedData(); } return(this.m_itemPageSizes.Height); IL_015f: flag4 = true; goto IL_0162; IL_0162: if (this.HasFooterOnPage(pageNumber, totalPages) || (flag3 && !flag)) { flag5 = true; } if (flag4 || flag5) { this.m_pageContext.EvaluatePageHeaderFooter = true; } goto IL_018a; }