Beispiel #1
0
        internal Page RunPageNew(Pages pgs, Page p)
        {
            if (p.IsEmpty())                                    // if the page is empty it won't help to create another one
            {
                return(p);
            }

            // Do we need a new page or have should we fill out more body columns
            Body b    = OwnerReport.Body;
            int  ccol = b.IncrCurrentColumn(pgs.Report);        // bump to next column

            float top = OwnerReport.TopOfPage;                  // calc top of page

            if (ccol < b.Columns)
            {                           // Stay on same page but move to new column
                p.XOffset =
                    ((OwnerReport.Width.Points + b.ColumnSpacing.Points) * ccol);
                p.YOffset = top;
                p.SetEmpty();                                   // consider this page empty
            }
            else
            {                           // Go to new page
                b.SetCurrentColumn(pgs.Report, 0);
                pgs.NextOrNew();
                p         = pgs.CurrentPage;
                p.YOffset = top;
                p.XOffset = 0;
            }

            return(p);
        }
Beispiel #2
0
Datei: Pages.cs Projekt: mnisl/OD
		public void NextOrNew()
		{
			if (_currentPage == this.LastPage)
				AddPage(new Page(PageCount+1));
			else
			{
				_currentPage = _pages[_currentPage.PageNumber];  
				_currentPage.SetEmpty();			
			}
		}
Beispiel #3
0
 public void NextOrNew()
 {
     if (_currentPage == this.LastPage)
     {
         AddPage(new Page(PageCount + 1));
     }
     else
     {
         _currentPage = _pages[_currentPage.PageNumber];
         _currentPage.SetEmpty();
     }
 }
Beispiel #4
0
		public void NextOrNew()
		{
			if (_currentPage == this.LastPage)
				AddPage(new Page(PageCount+1));
			else
			{
				_currentPage = _pages[_currentPage.PageNumber];  
				_currentPage.SetEmpty();			
			}
			//Allows using PageNumber in report body.
			//Important! This feature is NOT included in RDL specification!
			//PageNumber will be wrong if element using it will cause carry to next page after render.
			Report.PageNumber = _currentPage.PageNumber;
		}
Beispiel #5
0
 public void NextOrNew()
 {
     if (_currentPage == this.LastPage)
     {
         AddPage(new Page(PageCount + 1));
     }
     else
     {
         _currentPage = _pages[_currentPage.PageNumber];
         _currentPage.SetEmpty();
     }
     //Allows using PageNumber in report body.
     //Important! This feature is NOT included in RDL specification!
     //PageNumber will be wrong if element using it will cause carry to next page after render.
     Report.PageNumber = _currentPage.PageNumber;
 }
		internal Page RunPageNew(Pages pgs, Page p)
		{
			if (p.IsEmpty())			// if the page is empty it won't help to create another one
				return p;

			// Do we need a new page or have should we fill out more body columns
			Body b = OwnerReport.Body;
			int ccol = b.IncrCurrentColumn(pgs.Report);	// bump to next column

			float top = OwnerReport.TopOfPage;	// calc top of page

			if (ccol < b.Columns)
			{		// Stay on same page but move to new column
				p.XOffset = 
					((OwnerReport.Width.Points + b.ColumnSpacing.Points) * ccol);
				p.YOffset = top;
				p.SetEmpty();			// consider this page empty
			}
			else
			{		// Go to new page
				b.SetCurrentColumn(pgs.Report, 0);
				pgs.NextOrNew();
				p = pgs.CurrentPage;
				p.YOffset = top;
				p.XOffset = 0;
			}

			return p;
		}