This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Calculating Multiple Subtotals for Groups
- From: "David Messing 477-1289" <DMessing at Phase2Solutions dot com>
- To: <XSL-List at lists dot mulberrytech dot com>
- Date: Tue, 16 Apr 2002 15:07:29 -0700
- Subject: [xsl] Calculating Multiple Subtotals for Groups
- Reply-to: xsl-list at lists dot mulberrytech dot com
I have an XML document at http://www.teslapc.com/~wipeout/testdts.xml in this format:
<ScheduleVariance>
<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"/>
</Project>
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?
Thanks,
David Messing
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list