[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Calculating Multiple Subtotals for Groups

Subject: [xsl] Calculating Multiple Subtotals for Groups
From: "David Messing 477-1289" <DMessing@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 16 Apr 2002 15:07:29 -0700

I have an XML document at http://www.teslapc.com/~wipeout/testdts.xml in this format:

	<Project ProjectName="Sales">
		<Employee EmpID="118" EmpName="Doe, John" SchedStart="Mar 20 2002 10:00AM" ActualStart="Mar 20 2002 10:00AM" StartDiff="0:00" SchedEnd="Mar 20 2002  7:00PM" ActualEnd="Mar 20 2002  7:10PM" EndDiff="0:00" SchedLunchLen="1:00" ActualLunchLen="0:55" LunchDiff="0:05" SchedBreakLen="0:00" ActualBreakLen="0:00" BreakDiff="0:00" SchedLen="8:00" ActualLen="8:15" Total="0:15"/>

I'm currently using an XSL stylesheet (http://www.teslapc.com/~wipeout/schedulevariance.xsl)
to format it so it can be read as a report, but I need to add Project level subtotals for the "Diff" Fields to it.

The FXSL Transform-and-Sum function will give me a total for 1 field for the whole document, but I need project totals for each field.  I'm hoping that inserting the grand totals at the bottom later won't be too difficult.

So is there a way to calculate group level subtotals, and how would I insert those totals into my existing report without losing the formatting that I've already done?

David Messing

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread