Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Count by Group

Posted on 2006-07-01
2
Medium Priority
?
586 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 21

Accepted Solution

by:
pinaldave earned 2000 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

Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

Question has a verified solution.

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

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
What You Need to Know when Searching for a Webhost Provider
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

618 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