[Home] [By Thread] [By Date] [Recent Entries]
Jacek Dunia wrote:
<Calls> <Row NR="1"> <Rc>InTime</Rc> <WorkTime>20</WorkTime> <TechnicianName>Norman</TechnicianName> <ProblemType>INCYDENT</ProblemType> </Row> <Row NR="2"> <Rc>OutTime</Rc> <WorkTime>10</WorkTime> <TechnicianName>Peter</TechnicianName> <ProblemType>INCYDENT</ProblemType> </Row> <Row NR="3"> <Rc>InTime</Rc> <WorkTime>150</WorkTime> <TechnicianName>Norman</TechnicianName> <ProblemType>FAILURE</ProblemType> </Row> <Row NR="4"> <Rc>OutOfTime</Rc> <WorkTime>10</WorkTime> <TechnicianName>Norman</TechnicianName> <ProblemType>RemoteAccess</ProblemType> </Row> <Row NR="5"> <Rc>InTime</Rc> <WorkTime>20</WorkTime> <TechnicianName>Norman</TechnicianName> <ProblemType>INCYDENT</ProblemType> </Row> <Row NR="6"> <Rc>InTime</Rc> <WorkTime>20</WorkTime> <TechnicianName>Peter</TechnicianName> <ProblemType>INCYDENT</ProblemType> </Row> I would like get following out put Name TotalWorkTimeByIncydent TotalWorkTimeByFailure TotalWorkTime InTime OutOfTime Peter 30 0 30 1 1 Norman 40 150 200 2 1 The root element you show in your XML sample is named 'Calls', not 'Activities' so I would expect match="Calls/Row". <xsl:template match="Activities"> Same here, shouldn't that be match="Calls"? I think you want <xsl:value-of select="sum(key('list', TechnicianName)/WorkMinute)"/> to sum up the WorkMinute(s) for each Technician. -- Martin Honnen http://msmvps.com/blogs/martin_honnen/
|

Cart



