Defect #1963
function addPageBreak() - not working
Start date:
12/14/2020
Due date:
% Done:
0%
Estimated time:
Description
Based from the code the method addPageBreak() adds a Page Break in the table.
But it isn't working right now. The defined array $aData is not used and insertNewPage and addRow are disabled:
/**
* Adds a Page Break in the table.
*/
public function addPageBreak()
{
//$this->insertNewPage();
$aData = [];
$aData['ADD_PAGE_BREAK'] = true;
$this->dataCache[] = array(
'HEIGHT' => 0,
'DATATYPE' => self::TB_DATA_TYPE_INSERT_NEW_PAGE
);
// $this->addRow($aData);
}
Based from my understanding of the code the wrong constant is used within the code and it will work if you replace
'DATATYPE' => self::TB_DATA_TYPE_INSERT_NEW_PAGE
into
'DATATYPE' => self::TB_DATA_TYPE_NEW_PAGE
Because constant ...NEW_PAGE resolves to "new_page" which is used as a string in line 1495 and 1547.
Maybe you can check those lines and replace the string against the right constant.
I'm using newest release 6.1.0 and talking about table.php
Or am I wrongly using this method? Maybe you can guide me in this case...
Best wishes
Files