public ReportSection(AspNetCore.ReportingServices.OnDemandReportRendering.ReportSection reportSection, PageContext pageContext, PaginationSettings paginationSettings, SectionPaginationSettings sectionPaginationSettings) { this.m_reportSection = reportSection; this.m_pageContext = pageContext; this.m_pageSettings = paginationSettings; this.m_sectionPageSettings = sectionPaginationSettings; }
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; }