override internal void RunPage(Pages pgs, Row row) { Report r = pgs.Report; if (IsHidden(r, row)) { return; } TableWorkClass wc = GetValue(r); if (_IsGrid) { wc.Data = Rows.CreateOneRow(r); } else { wc.Data = GetFilteredData(r, row); } SetPagePositionBegin(pgs); if (!AnyRowsPage(pgs, wc.Data)) // if no rows return { return; // nothing left to do } RunPrep(r, row, wc); RunPageRegionBegin(pgs); Page p = pgs.CurrentPage; p.YOffset += this.RelativeY(r); // Calculate the xpositions of the columns TableColumns.CalculateXPositions(r, GetOffsetCalc(r) + LeftCalc(r), row); RunPageHeader(pgs, wc.Data.Data[0], true, null); if (wc.RecursiveGroup != null) { RunRecursiveGroupsPage(pgs, wc); } else { RunGroupsPage(pgs, wc, wc.Groups, wc.Data.Data.Count - 1, 0); } // Footer if (_Footer != null) { Row lrow = wc.Data.Data.Count > 0? wc.Data.Data[wc.Data.Data.Count - 1]: null; p = pgs.CurrentPage; // make sure the footer fits on the page if (p.YOffset + _Footer.HeightOfRows(pgs, lrow) > pgs.BottomOfPage) { p = RunPageNew(pgs, p); RunPageHeader(pgs, row, false, null); } _Footer.RunPage(pgs, lrow); } RunPageRegionEnd(pgs); SetPagePositionEnd(pgs, pgs.CurrentPage.YOffset); RemoveValue(r); }
override internal void Run(IPresent ip, Row row) { Report r = ip.Report(); TableWorkClass wc = GetValue(r); if (_IsGrid) { wc.Data = Rows.CreateOneRow(r); } else { wc.Data = GetFilteredData(r, row); } if (!AnyRows(ip, wc.Data)) // if no rows return { return; // nothing left to do } RunPrep(r, row, wc); if (!ip.TableStart(this, row)) { return; // render doesn't want to continue } if (_TableColumns != null) { _TableColumns.Run(ip, row); } // Header if (_Header != null) { ip.TableHeaderStart(_Header, row); Row frow = wc.Data.Data.Count > 0? wc.Data.Data[0]: null; _Header.Run(ip, frow); ip.TableHeaderEnd(_Header, row); } // Body ip.TableBodyStart(this, row); if (wc.RecursiveGroup != null) { RunRecursiveGroups(ip, wc); } else { RunGroups(ip, wc.Groups, wc); } ip.TableBodyEnd(this, row); // Footer if (_Footer != null) { ip.TableFooterStart(_Footer, row); Row lrow = wc.Data.Data.Count > 0? wc.Data.Data[wc.Data.Data.Count - 1]: null; _Footer.Run(ip, lrow); ip.TableFooterEnd(_Footer, row); } ip.TableEnd(this, row); RemoveValue(r); }