markers problem
Posted: Mon Nov 21, 2011 12:08 pm
Hi all
i use markers to print some data only on the last page(if there is another possibility teach me).
I declare the markers :
and i call it when i need :
I can have more than one row in my table and it semms that every time when a marker is called, the marker add another row or an another block why?
i use markers to print some data only on the last page(if there is another possibility teach me).
I declare the markers :
Code: Select all
<fo:block font-family="Times" font-size="1pt">
<fo:marker marker-class-name="totale">
<xsl:text disable-output-escaping="yes">€ </xsl:text>
<xsl:value-of disable-output-escaping="yes" select="/fattura/totali/totale"/>
</fo:marker>
<fo:marker marker-class-name="contr-conai">
<xsl:text disable-output-escaping="yes">Contributo CONAI assolto ove dovuto</xsl:text>
</fo:marker>
<fo:marker marker-class-name="imponibile">
<xsl:for-each select="sommario/dett-sommario">
<fo:block font-family="Times" font-size="10pt" text-align="right">
<xsl:value-of disable-output-escaping="yes" select="./imponibile"/>
</fo:block>
</xsl:for-each>
</fo:marker>
<fo:marker marker-class-name="aliquota">
<xsl:for-each select="sommario/dett-sommario">
<fo:block font-family="Times" font-size="10pt" text-align="right">
<xsl:value-of disable-output-escaping="yes" select="./aliquota"/>
</fo:block>
</xsl:for-each>
</fo:marker>
<fo:marker marker-class-name="esenzione">
<xsl:for-each select="sommario/dett-sommario">
<fo:block font-family="Times" font-size="10pt" text-align="right">
<xsl:value-of disable-output-escaping="yes" select="./esenzione"/>
</fo:block>
</xsl:for-each>
</fo:marker>
<fo:marker marker-class-name="importo">
<xsl:for-each select="sommarioEsenti/sommarioEsentiDett">
<fo:block font-family="Times" font-size="10pt" text-align="right">
<xsl:value-of disable-output-escaping="yes" select="./importo"/>
</fo:block>
</xsl:for-each>
</fo:marker>
<fo:marker marker-class-name="causale">
<xsl:for-each select="sommarioEsenti/sommarioEsentiDett">
<fo:block font-family="Times" font-size="10pt" text-align="left"
margin-left="2mm">
<xsl:value-of disable-output-escaping="yes" select="./causale"/>
</fo:block>
</xsl:for-each>
</fo:marker>
</fo:block>
and i call it when i need :
Code: Select all
<fo:table-row height="20mm">
<fo:table-cell>
<fo:table width="200mm" height="20mm" table-layout="fixed">
<fo:table-column column-width="30mm"/>
<fo:table-column column-width="20mm"/>
<fo:table-column column-width="30mm"/>
<fo:table-column column-width="120mm"/>
<fo:table-body>
<xsl:choose>
<xsl:when test="count(sommario/dett-sommario) = 0">
<fo:table-row keep-together="always" height="20mm">
<fo:table-cell border-right-color="black"
border-right-style="solid"
border-right-width="0.5pt">
<fo:block font-family="Times" font-size="8pt"
text-align="right">
<xsl:text disable-output-escaping="yes"> </xsl:text>
</fo:block>
</fo:table-cell>
<fo:table-cell border-right-color="black"
border-right-style="solid"
border-right-width="0.5pt">
<fo:block font-family="Times" font-size="8pt"
text-align="right">
<xsl:text disable-output-escaping="yes"> </xsl:text>
</fo:block>
</fo:table-cell>
<fo:table-cell border-right-color="black"
border-right-style="solid"
border-right-width="0.5pt">
<fo:block font-family="Times" font-size="8pt"
text-align="right">
<xsl:text disable-output-escaping="yes"> </xsl:text>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block font-family="Courier" font-size="8pt"
text-align="center">
<fo:retrieve-marker
retrieve-class-name="contr-conai"
retrieve-position="last-ending-within-page"
retrieve-boundary="page-sequence"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:when>
<xsl:otherwise>
<fo:table-row keep-together="always" height="20mm">
<fo:table-cell border-right-color="black"
border-right-style="solid"
border-right-width="0.5pt">
<fo:retrieve-marker
retrieve-class-name="imponibile"
retrieve-position="last-ending-within-page"
retrieve-boundary="page-sequence"/>
</fo:table-cell>
<fo:table-cell border-right-color="black"
border-right-style="solid"
border-right-width="0.5pt">
<fo:retrieve-marker
retrieve-class-name="aliquota"
retrieve-position="last-ending-within-page"
retrieve-boundary="page-sequence"/>
</fo:table-cell>
<fo:table-cell border-right-color="black"
border-right-style="solid"
border-right-width="0.5pt">
<fo:retrieve-marker
retrieve-class-name="esenzione"
retrieve-position="last-ending-within-page"
retrieve-boundary="page-sequence"/>
</fo:table-cell>
<fo:table-cell>
<fo:block font-family="Courier" font-size="10pt"
text-align="center">
<fo:retrieve-marker
retrieve-class-name="contr-conai"
retrieve-position="last-ending-within-page"
retrieve-boundary="page-sequence"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:otherwise>
</xsl:choose>
</fo:table-body>
</fo:table>
</fo:table-cell>
</fo:table-row>