Zahid Hafeez wrote:
i generating report pdf through xsl
there are multiple pages i need to display the balance before the page

end and the next page the balance is at the top after the table header
what can i use table-footer or region-end?
plz tell me the solution how to handle the balance before the page end
and after the table header of the next page

I suppose you mean something like

 a       2
 b       3
 c       5
 ---------
 subtot  10
 ------------- page break
         10
 d        8
 e        9
 f        2
 ---------
 subtot  29
-------------- page break

Well, unless you can determine how many rows will get onto
the pages during the XSL transformation the answer is "you
can't do it". The page break is determined by the FO processor
well *after* the transformation.
If you know how many rows fit on a page (preferably always
the same number), and you start at a well determined position,
for example after an explicit page break, the problem is known
as "grouping by position".
Roughly like this ($N is the number of rows fitting on a page)

   <xsl:for-each select="row[position() mod $N=1]">
      <fo:table break-before="page">
        <fo:table-column...>
        <fo:table-body>
          <xsl:for-each select=".|following-sibling::row[position &lt; $N]">
            <fo:table-row>
              <fo:table-cell> ....</fo:table-cell>
            </fo:table-row>
          </xsl:for-each>
          <fo:table-row>
            <fo:table-cell>
              <fo:block>subtotal</fo:block>
            </fo:table-cell>
            <fo:table-cell>
              <fo:block>
                <xsl:value-of select="sum(.|following-sibling::row[position &lt; 
$N]"/>
              </fo:block>
            </fo:table-cell>
          </fo:table-row>
        </fo:table-body>
       </fo:table>
   </xsl:for-each>

This is an XSLT question, further details should be asked for
on the XSL list.

J.Pietschmann



Reply via email to