I'm not entirely sure I follow where it is you want the total to
display and/or reset to 0. If you want to track each manager grouping
separately, you'll need another count running as well as the overall total
count.
<!--- overall Total; init at 0 --->
<cfset sumTotal = 0>
<cfoutput query="get_Sales" group="Market">
<h3><cfif get_Sales.Market IS 1>
Industrial Sales Reps
<cfelse>
IT Sales Reps
</cfif></h3>
<cfoutput group="Manager">
<!--- this is used to add up each manager's reps. Reset to 0 at the start of
each new manager --->
<cfset subTotal = 0>
<h4>#get_Sales.Manager#</h4>
<h5>Name - Total Leads - Rep Company</h5>
<cfoutput>
<cfquery datasource="#request.dsn#" name="get_leads">
Select Count(*) AS total
From Leads
WHERE r_agn = #get_Sales.usr_id#
</cfquery>
#get_Sales.Fname# #get_Sales.usr_lname# :: #get_leads.total#<br>
<br>
<!--- This will add the current get_Sales.usr_id's lead total to the
manager's subtotal --->
<CFSET subTotal = subTotal + get_leads.total>
</cfoutput> <br>
<!--- This will display each manager's total for all their Rep's --->
<span class="style1">#subTotal#</span>
<!--- this adds this manager's subtotal to the overall total --->
<cfset sumTotal = sumTotal + subTotal>
</cfoutput></cfoutput>
<!--- This is the overall total for all managers --->
<cfoutput>#sumTotal</cfoutput>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295891
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4