问题
Using RTF and BI Publisher, I have a long table and I want to show only 10 rows on each page. How to do that? As far as I did is:
After grouping defining some variables:
<?xdoxslt:set_variable($_XDOCTX, ‘counter’, 0)?> <?xdoxslt:set_variable($_XDOCTX, ‘lines_page’, 16)?> <?xdoxslt:set_variable($_XDOCTX, ‘tot_lines’, count(.//A.U_VATX))?>
Inside the cell of first column:
<?xdoxslt:set_variable($_XDOCTX, ‘counter’,xdoxslt:get_variable($_XDOCTX, ‘counter’)+1)?> <?if@inlines:xdoxslt:get_variable($_XDOCTX,’counter’) != xdoxslt:get_variable($_XDOCTX,’tot_lines’)?> <?if@inlines:position() mod xdoxslt:get_variable($_XDOCTX, ‘lines_page’) = xdoxslt:get_variable($_XDOCTX,’lines_page’)-1?><?call:footer?><?end if?> <?if@inlines:position() mod xdoxslt:get_variable($_XDOCTX, ‘lines_page’) = 0?><?call:breaking?><?end if?><?end if?>
After table, defining the templates:
<?template:footer?> table cell with data <?end template?> <?call-template:footer?> <?template:breaking?> table cell empty <?split-by-page-break:?> <?end template?>
End
来源:https://stackoverflow.com/questions/52344984/limiting-table-rows-bip