totalizar montos por sucursal en xsl
Publicado por leyla (1 intervención) el 14/12/2004 17:23:01
tengo un for-each en xsl ordenado por sucursal en el cual vienen montos, los cuales debo totalizar al final de la página..
como lo hago?? gracias..
<xsl:variable name="CODSUC"><xsl:value-of select="/DETALLESGASTOS/DETALLEGASTO/CODSUCURSAL"/></xsl:variable>
<xsl:variable name="GLSSUC"><xsl:value-of select="/DETALLESGASTOS/DETALLEGASTO/GLSSUCURSAL"/></xsl:variable>
<xsl:variable name="MONTOGASTO"><xsl:value-of select="/DETALLESGASTOS/DETALLEGASTO/MONTOTAREA"/></xsl:variable>
<xsl:for-each select="//CODSUC">
<xsl:if test=".[CODSUCURSAL=CODSUC]">
<xsl:variable name="SUMA"><xsl:value-of select="sum(MONTOTAREA)"/></xsl:variable>
</xsl:if>
</xsl:for-each>
como lo hago?? gracias..
<xsl:variable name="CODSUC"><xsl:value-of select="/DETALLESGASTOS/DETALLEGASTO/CODSUCURSAL"/></xsl:variable>
<xsl:variable name="GLSSUC"><xsl:value-of select="/DETALLESGASTOS/DETALLEGASTO/GLSSUCURSAL"/></xsl:variable>
<xsl:variable name="MONTOGASTO"><xsl:value-of select="/DETALLESGASTOS/DETALLEGASTO/MONTOTAREA"/></xsl:variable>
<xsl:for-each select="//CODSUC">
<xsl:if test=".[CODSUCURSAL=CODSUC]">
<xsl:variable name="SUMA"><xsl:value-of select="sum(MONTOTAREA)"/></xsl:variable>
</xsl:if>
</xsl:for-each>
Valora esta pregunta
0