Limiting table rows (BIP)

让人想犯罪 __ 提交于 2019-12-02 18:06:42

问题


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:

  1. 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))?>
    
  2. 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?>
    
  3. 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?>
    
  4. End

来源:https://stackoverflow.com/questions/52344984/limiting-table-rows-bip

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!