Beispiel #1
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]);
                }
            }
        }
Beispiel #2
0
        public void OnBeginGroup(IRow semirow)
        {
            _bgrouping = true;
            _lastpage  = _currentpage;
            if (_lastpage != null)
            {
                _lastpage.EndPage();
            }

            if (semirow != null)
            {
                _groupcount++;
                _currentpage = new PrintPage(_printpages.Count, _groupcount);
                _printpages.Add(_currentpage);
            }
            else
            {
                _currentpage = null;
                return;
            }
            //getdata from 0 start
            SetData(semirow);
        }