Exemple #1
0
 public void HandleARow(IRow semirow)
 {
     if (!semirow.bMinorLevel)
     {
         return;
     }
     if (_currentpage == null)
     {
         _groupcount++;
         _currentpage = new PrintPage(_printpages.Count, _groupcount);
         _printpages.Add(_currentpage);
         SetData(semirow);
     }
     //page sum
     if (_pagesumkeys != null)
     {
         foreach (string key in _pagesumkeys)
         {
             _currentpage.AddPageSum(key, semirow[key]);
         }
     }
     //page acc sum
     if (_pageaccsumkeys != null)
     {
         foreach (string key in _pageaccsumkeys)
         {
             _currentpage.AddPageAccSum(key, semirow[key]);
         }
     }
     //group page acc sum
     if (_groupsumkeys != null)
     {
         foreach (string key in _groupsumkeys)
         {
             _currentpage.AddGroupPageAccSum(key, semirow[key]);
         }
     }
 }
Exemple #2
0
        public void OnPage(IRow semirow)
        {
            PrintPage lastpage = _currentpage;

            if (lastpage != null)
            {
                lastpage.EndPage();
            }
            _currentpage = new PrintPage(_printpages.Count, _groupcount);
            _printpages.Add(_currentpage);
            TransformDataFromLastWhenOnPage(lastpage);
            if (semirow is SemiRow)
            {
                _currentpage.SemiRow = semirow as SemiRow;
            }
            if (!semirow.bMinorLevel)
            {
                return;
            }
            //grouppageaccsum from the last page in this group
            if (_groupsumkeys != null)
            {
                foreach (string key in _groupsumkeys)
                {
                    _currentpage.AddGroupPageAccSum(key, semirow[key]);
                }
            }
            //pagesum from 0 start
            if (_pagesumkeys != null)
            {
                foreach (string key in _pagesumkeys)
                {
                    _currentpage.AddPageSum(key, semirow[key]);
                }
            }
            //pageaccsum from the last page
            if (_pageaccsumkeys != null)
            {
                foreach (string key in _pageaccsumkeys)
                {
                    _currentpage.AddPageAccSum(key, semirow[key]);
                }
            }
        }