コード例 #1
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;
                if (r == end)
                {
                    height += footerHeight;                             // on last row; may need additional room for footer
                }

                /* Original Code:
                 * if (height > pgs.BottomOfPage)
                 * {
                 *      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);
                 */
                /* http://fyireporting.com/forum/viewtopic.php?t=774 */
                if (height > pgs.BottomOfPage)
                {
                    //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, true /*hrows > pgs.BottomOfPage*/); //A.S> we need to checka allways - as there can be subreport which will grow
                }
            }
            return;
        }
コード例 #2
0
        internal void RunPage(Pages pgs, Row row)
        {
            Page p = pgs.CurrentPage;

            /* Commented out: http://fyireporting.com/forum/viewtopic.php?t=774
             *          if (p.YOffset + HeightOfRows(pgs, row) > pgs.BottomOfPage)
             *          {
             *                  p = OwnerTable.RunPageNew(pgs, p);
             *                  OwnerTable.RunPageHeader(pgs, row, false, null);
             *          }*/
            _TableRows.RunPage(pgs, row);

            return;
        }