Reputation: 123
I have a table witch can use multiples pages, I would like to have a subtotal on every page. I could get the subtotal until the page I'm looking at (with preceding-siblings) but not the total of the page itself.
I found a stackoverflow response ( XSLT 1.0: Calculating Subtotal on each page ) but it use a fixed number of row. In my case i wont know how many row will be shown in advance, and the number can change between the pages.
some part of the xsl :
<fo:static-content flow-name="footer">
<fo:block-container height="10mm">
<xsl:variable name="vStart" ><fo:retrieve-marker retrieve-class-name="RunningSubTotal"
retrieve-boundary="page" retrieve-position="first-starting-within-page" />
</xsl:variable>
<xsl:variable name="vEnd" ><fo:retrieve-marker retrieve-class-name="RunningSubTotal"
retrieve-boundary="page" retrieve-position="last-ending-within-page" />
</xsl:variable>
<fo:block font-size="8pt">vStart:<xsl:copy-of select="$vStart" /></fo:block>
<fo:block font-size="8pt">vEnd:<xsl:copy-of select="$vEnd" /></fo:block>
<fo:block font-size="8pt">diff (vEnd - vStart):</fo:block>
</fo:block-container>
</fo:static-content>
So:
Upvotes: 0
Views: 34