示例#1
0
        internal float HeightOfRow(Pages pgs, Row r)
        {
            WorkClass wc = GetWC(pgs.Report);

            if (this.Visibility != null && Visibility.IsHidden(pgs.Report, r))
            {
                wc.CalcHeight = 0;
                return(0);
            }

            float defnHeight = _Height.Points;

            if (!_CanGrow)
            {
                wc.CalcHeight = defnHeight;
                return(defnHeight);
            }

            TableColumns tcs    = this.Table.TableColumns;
            float        height = 0;

            foreach (Textbox tb in this._GrowList)
            {
                int ci = tb.TC.ColIndex;
                if (tcs[ci].IsHidden(pgs.Report, r))    // if column is hidden don't use in calculation
                {
                    continue;
                }
                height = Math.Max(height, tb.RunTextCalcHeight(pgs.Report, pgs.G, r));
            }
            wc.CalcHeight = Math.Max(height, defnHeight);
            return(wc.CalcHeight);
        }
示例#2
0
 internal bool IsHidden(Report rpt, Row r)
 {
     if (this._Visibility == null)
     {
         return(false);
     }
     return(_Visibility.IsHidden(rpt, r));
 }
示例#3
0
        internal float HeightOfRows(Pages pgs, Row r)
        {
            if (this.Visibility != null && Visibility.IsHidden(pgs.Report, r))
            {
                return(0);
            }

            return(_TableRows.HeightOfRows(pgs, r));
        }
示例#4
0
        internal void Run(IPresent ip, Row row)
        {
            if (this.Visibility != null && Visibility.IsHidden(ip.Report(), row))
            {
                return;
            }

            ip.TableRowStart(this, row);
            _TableCells.Run(ip, row);
            ip.TableRowEnd(this, row);
            return;
        }
示例#5
0
        internal void RunPage(Pages pgs, Row row)
        {
            if (this.Visibility != null && Visibility.IsHidden(pgs.Report, row))
            {
                return;
            }

            _TableCells.RunPage(pgs, row);

            WorkClass wc = GetWC(pgs.Report);

            pgs.CurrentPage.YOffset += wc.CalcHeight;
            return;
        }
示例#6
0
 internal void Run(IPresent ip, Rows rs, int start, int end)
 {
     // if no rows output or rows just leave
     if (rs == null || rs.Data == null)
     {
         return;
     }
     if (this.Visibility != null && Visibility.IsHidden(ip.Report(), rs.Data[start]) && Visibility.ToggleItem == null)
     {
         return;                 // not visible
     }
     for (int r = start; r <= end; r++)
     {
         _TableRows.Run(ip, rs.Data[r]);
     }
     return;
 }
示例#7
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;
        }