Solved

Count by Group

Posted on 2006-07-01
2
572 Views
Last Modified: 2013-12-24
 <cfoutput group="Disposition" query ="TimeFollowedMonths">
    <tr bgcolor="FFFFCC">
       <td>#Disposition#</td>
         <cfSet count = 1>
         <cfoutput>
             <cfif count NEQ 1>
                 </tr>
                 <tr>
                 <td>&nbsp;</td>
             </cfif>
      <td>
        <div align="right">#TheTimes#</div>
      </td>
      <td>
        <div align="center">#dateformat("#DateDischarged#", "mm/dd/yyyy")#</div>
      </td>
    </tr>
              <cfset count = count + 1>
      </cfoutput>         
  </cfoutput>
</table>

How do you put the count of each group at i.e. <td>#Disposition# (Count: 123)</td>, or at the bottom of each group?
0
Comment
Question by:ethanjohnsons
2 Comments
 
LVL 21

Accepted Solution

by:
pinaldave earned 500 total points
ID: 17030802
Soemthing like this:
<cfset dispositioncount = 0>
<cfoutput group="Disposition" query ="TimeFollowedMonths">
    <tr bgcolor="FFFFCC">
      <td>#Disposition#</td>
         <cfSet count = 1>
         <cfoutput>
             <cfif count NEQ 1>
                 </tr>
                 <tr>
                 <td>&nbsp;</td>
             </cfif>
      <td>
        <div align="right">#TheTimes#</div>
      </td>
      <td>
        <div align="center">#dateformat("#DateDischarged#", "mm/dd/yyyy")#</div>
      </td>
    </tr>
              <cfset count = count + 1>
<cfset dispositioncount = dispositioncount+1>
      </cfoutput>        
#dispositioncount#
  </cfoutput>
</table>

OR ------------------------------
You can use yourname.recordcount to display the recordcount.

Regards,
---Pinal
0
 

Author Comment

by:ethanjohnsons
ID: 17033266
great!
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now