[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: Re: Display the number of records in a group
Subject: Re: 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:40, David Carlisle wrote:
On 17/03/2010 16:15, anil kumar wrote:
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>
or of course if you don't really need the groups at all you can just
output the number of distinct grouping keys
<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)))"/>
and not use for-each-group at all.
David
________________________________________________________________________
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.
This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|