internal void RunPage(Pages pgs) { if (OwnerReport.Subreport != null) { return; // don't process page footers for sub-reports } if (_ReportItems == null) { return; } Report rpt = pgs.Report; rpt.TotalPages = pgs.PageCount; foreach (Page p in pgs) { rpt.CurrentPage = p; // needs to know for page header/footer expr processing p.YOffset = OwnerReport.PageHeight.Points - OwnerReport.BottomMargin.Points - this._Height.Points; p.XOffset = 0; pgs.CurrentPage = p; rpt.PageNumber = p.PageNumber; if (p.PageNumber == 1 && pgs.Count > 1 && !_PrintOnFirstPage) { continue; // Don't put footer on the first page } if (p.PageNumber == pgs.Count && !_PrintOnLastPage) { continue; // Don't put footer on the last page } _ReportItems.RunPage(pgs, null, OwnerReport.LeftMargin.Points); } }
internal void RunPage(Pages pgs) { if (OwnerReport.Subreport == null) { // Only set bottom of pages when on top level report pgs.BottomOfPage = OwnerReport.BottomOfPage; pgs.CurrentPage.YOffset = OwnerReport.TopOfPage; } this.SetCurrentColumn(pgs.Report, 0); if (_ReportItems != null) { _ReportItems.RunPage(pgs, null, OwnerReport.LeftMargin.Points); } return; }
override internal void RunPage(Pages pgs, Row row) { Report r = pgs.Report; bool bHidden = IsHidden(r, row); SetPagePositionBegin(pgs); // Handle page breaking at start if (this.PageBreakAtStart && !IsTableOrMatrixCell(r) && !pgs.CurrentPage.IsEmpty() && !bHidden) { // force page break at beginning of dataregion pgs.NextOrNew(); pgs.CurrentPage.YOffset = OwnerReport.TopOfPage; } PageRectangle pr = new PageRectangle(); SetPagePositionAndStyle(r, pr, row); if (pr.SI.BackgroundImage != null) { pr.SI.BackgroundImage.H = pr.H; // and in the background image } if (!bHidden) { Page p = pgs.CurrentPage; p.AddObject(pr); if (_ReportItems != null) { float saveY = p.YOffset; // p.YOffset += (Top == null ? 0 : this.Top.Points); p.YOffset = pr.Y; // top of rectangle is base for contained report items _ReportItems.RunPage(pgs, row, GetOffsetCalc(pgs.Report) + LeftCalc(r)); p.YOffset = saveY; } // Handle page breaking at end if (this.PageBreakAtEnd && !IsTableOrMatrixCell(r) && !pgs.CurrentPage.IsEmpty()) { // force page break at beginning of dataregion pgs.NextOrNew(); pgs.CurrentPage.YOffset = OwnerReport.TopOfPage; } } // SetPagePositionEnd(pgs, pgs.CurrentPage.YOffset); SetPagePositionEnd(pgs, pr.Y + pr.H); }