I now this is quite simple... however I need clues to get me started... 
How does one go about breaking out the various subtotals from a dataset?

Example:
In this example table there are multiples of the same parttype.

parttype  partname    instock
--------  --------    -------
carparts  mufflerX     25
carparts  mufflerY     15
carparts  engineSA     12
carparts  wheel12      27
planeparts  wingZ      9
planeparts  rudderQ    3
planeparts  engineRR   2

Would typically do something like this in CF
<query="thelist">
  Select * 
  From parts
  Order by parttype
</query>

<cfoutput query="thelist">
   <tr><td>#thelist.PartType#</td><td>#thelist.PartName#</td></tr>
</cfoutput>

Would like to be able to generate subtotals...like this:

parttype  partname  instock
--------  --------  -------
carparts  mufflerX   25
carparts  mufflerY   15
carparts  engineSA   12
carparts  wheel12    27
SUBTOTAL ---------   -----
                     79

planeparts  wingZ     9
planeparts  rudderQ   3
planeparts  engineRR  2
SUBTOTAL -----------  ------
                      14

Thanks for any and all hints. ;-)
Brian

______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to