Subject: Re: [xsl] Re: Display the number of records in a group|
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 17 Mar 2010 16:50:18 +0000
On 17/03/2010 16:15, anil kumar wrote:or of course if you don't really need the groups at all you can just output the number of distinct grouping keys
I'm not sure what the problem was any more, but inide the for-each-group position() goes from 1 to 8, as last() is 8 as there are 8 groups.
If you don't want the groups, just the number, you can stop after the first and output 8, eg:
<xsl:for-each-group select="G_ROW[INTRA_EU_TRX_CODE = ('GOOD','TRIANGULATION')]" group-by="concat(VAT_TAX_NO,BILL_CUST_NAME,INTRA_EU_TRX_CODE)"> <xsl:if test="position()=1">[<xsl:value-of select="last()"/>]</xsl:if> </xsl:for-each-group>
<xsl:value-of select="count(distinct-values( G_ROW[INTRA_EU_TRX_CODE =('GOOD','TRIANGULATION')]/ concat(VAT_TAX_NO,BILL_CUST_NAME,INTRA_EU_TRX_CODE)))"/>
________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.