Solved

SUM by Group

Posted on 2006-07-03
2
537 Views
Last Modified: 2013-12-24
 <cfoutput group="ReferralSourceIntake" query="......">
    <tr bgcolor="FFFFCC">
       <td>#ReferralSourceIntake#</td>
         <cfSet count = 1>
         <cfoutput>
             <cfif count NEQ 1>
                 </tr>
                 <tr>
                 <td>&nbsp;</td>
             </cfif>
                  
      <td>#dateformat("#IntakeDate#", "mm/dd/yyyy")#</td>
      <td>#TheCount#</td>
    </tr>
        <cfset count = count + 1>
      </cfoutput>
  </cfoutput>

I want to put SUM (= SUM of #TheCount#) of each group at the end of each group section.
How do you accomplish this?
0
Comment
Question by:ethanjohnsons
2 Comments
 
LVL 12

Accepted Solution

by:
mkishline earned 500 total points
ID: 17032001
<cfoutput group="ReferralSourceIntake" query="......">
    <tr bgcolor="FFFFCC">
       <td>#ReferralSourceIntake#</td>
         <cfset groupcount = 0 />
         <cfSet count = 1>
         <cfoutput>
             <cfif count NEQ 1>
                 </tr>
                 <tr>
                 <td>&nbsp;</td>
             </cfif>
               
      <td>#dateformat("#IntakeDate#", "mm/dd/yyyy")#</td>
      <td>#TheCount#</td>
    </tr>
       <cfset count = count + 1>
       <cfset groupcount = groupcount + TheCount />
     </cfoutput>
     #GroupCount#
  </cfoutput>
0
 

Author Comment

by:ethanjohnsons
ID: 17032247
great!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question