Exemplo n.º 1
0
 internal void RunPage(Pages pgs, Row row, bool bCheckRows)
 {
     if (bCheckRows)
     {                   // we need to check to see if a row will fit on the page
         foreach (TableRow t in _Items)
         {
             Page  p      = pgs.CurrentPage;                             // this can change after running a row
             float hrows  = t.HeightOfRow(pgs, row);                     // height of this row
             float height = p.YOffset + hrows;
             if (height > pgs.BottomOfPage)
             {
                 p = OwnerTable.RunPageNew(pgs, p);
                 OwnerTable.RunPageHeader(pgs, row, false, null);
             }
             t.RunPage(pgs, row);
         }
     }
     else
     {                   // all rows will fit on the page
         foreach (TableRow t in _Items)
         {
             t.RunPage(pgs, row);
         }
     }
     return;
 }
Exemplo n.º 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;
            }

            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;
                if (r == end)
                {
                    height += footerHeight;                             // on last row; may need additional room for footer
                }
                if (height > pgs.BottomOfPage)
                {
                    p = OwnerTable.RunPageNew(pgs, p);
                    OwnerTable.RunPageHeader(pgs, row, false, null);
                }
                _TableRows.RunPage(pgs, row, hrows > pgs.BottomOfPage);
            }
            return;
        }
Exemplo n.º 3
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;
        }
Exemplo n.º 4
0
        internal void RunPage(Pages pgs, Row row)
        {
            Page p = pgs.CurrentPage;

            if (p.YOffset + HeightOfRows(pgs, row) > pgs.BottomOfPage)
            {
                p = OwnerTable.RunPageNew(pgs, p);
                OwnerTable.RunPageHeader(pgs, row, false, null);
            }
            _TableRows.RunPage(pgs, row);

            return;
        }
Exemplo n.º 5
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;

                // dst, add the footerheight if end is reached or the footer must be on every page
                if ((OwnerTable.Footer != null && OwnerTable.Footer.RepeatOnNewPage) || r == end)
                {
                    height += footerHeight;
                }

                //if (r == end)
                //	height += footerHeight;		// on last row; may need additional room for footer
                if (height > pgs.BottomOfPage)
                {
                    OwnerTable.RunPageFooter(pgs, row, r == end);
                    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;
        }
Exemplo n.º 6
0
 internal void RunPage(Pages pgs, Row row, bool bCheckRows)
 {
     if (bCheckRows)
     {                          // we need to check to see if a row will fit on the page
         bool bNewPage = false; // http://fyireporting.com/forum/viewtopic.php?t=774
         foreach (TableRow t in _Items)
         {
             Page  p      = pgs.CurrentPage;             // this can change after running a row
             float hrows  = t.HeightOfRow(pgs, row);     // height of this row
             float height = p.YOffset + hrows;
             if (height > pgs.BottomOfPage)
             {
                 if (bNewPage) // this row height is bigger than page height - don't create new one... // http://fyireporting.com/forum/viewtopic.php?t=774
                 {
                     break;    // http://fyireporting.com/forum/viewtopic.php?t=774
                 }
                 p = OwnerTable.RunPageNew(pgs, p);
                 OwnerTable.RunPageHeader(pgs, row, false, null);
                 bNewPage = true; // http://fyireporting.com/forum/viewtopic.php?t=774
             }
             else // http://fyireporting.com/forum/viewtopic.php?t=774
             {
                 bNewPage = false;
             }
             t.RunPage(pgs, row);
         }
     }
     else
     {   // all rows will fit on the page
         foreach (TableRow t in _Items)
         {
             t.RunPage(pgs, row);
         }
     }
     return;
 }