Exemple #1
0
        internal void RunPage(Pages pgs, Row row)
        {
            WorkClass wc = this.GetValue(pgs.Report);

            if (wc.OutputRow == row && wc.OutputPage == pgs.CurrentPage)
            {
                return;
            }

            Page p = pgs.CurrentPage;

            float height = p.YOffset + HeightOfRows(pgs, row);

            height += OwnerTable.GetPageFooterHeight(pgs, row);
            if (height > pgs.BottomOfPage)
            {
                Table t = OwnerTable;
                t.RunPageFooter(pgs, row, false);
                p = t.RunPageNew(pgs, p);
                t.RunPageHeader(pgs, row, false, null);
                if (this.RepeatOnNewPage)
                {
                    return;                             // should already be on the page
                }
            }

            _TableRows.RunPage(pgs, row);
            wc.OutputRow  = row;
            wc.OutputPage = pgs.CurrentPage;
            return;
        }
Exemple #2
0
        internal void RunPage(Pages pgs, Rows rs, int start, int end, float footerHeight)
        {
            // if no rows output or rows just leave
            if (rs == null || rs.Data == null)
            {
                return;
            }

            if (this.Visibility != null && Visibility.IsHidden(pgs.Report, rs.Data[start]))
            {
                return;                 // not visible
            }
            Page p;

            Row row;

            for (int r = start; r <= end; r++)
            {
                p   = pgs.CurrentPage;                                  // this can change after running a row
                row = rs.Data[r];
                float hrows  = HeightOfRows(pgs, row);                  // height of all the rows in the details
                float height = p.YOffset + hrows;

                // add the footerheight that must be on every page
                height += OwnerTable.GetPageFooterHeight(pgs, row);

                if (r == end)
                {
                    height += footerHeight;                             // on last row; may need additional room for footer
                }
                if (height > pgs.BottomOfPage)
                {
                    OwnerTable.RunPageFooter(pgs, row, false);
                    p = OwnerTable.RunPageNew(pgs, p);
                    OwnerTable.RunPageHeader(pgs, row, false, null);
                    _TableRows.RunPage(pgs, row, true);   // force checking since header + hrows might be > BottomOfPage
                }
                else
                {
                    _TableRows.RunPage(pgs, row, hrows > pgs.BottomOfPage);
                }
            }
            return;
        }