Here's another way to do it:

total: <cfoutput>#arraysum(yourqueryname["order_value"])#</cfoutput>

Remember that query columns can be treated as arrays and you can use
any array function on them.

On 7/7/05, Chris Kavanagh <[EMAIL PROTECTED]> wrote:
> Hey list!
> 
> How's it going?  My first app is running now.  I couldn't have done
> it without everybody's help!  Thanks to all.  Perhaps I will
> eventually become a useful member myself.
> 
> Now, in my app I have a CFOUTPUT that displays table rows like this:
> 
> CUSTOMER      PRODUCT      ORDER VALUE
> #customer#        #product#        #order_value#
> 
> I'd like to have a TOTAL field at the bottom of the table, that
> displays the sum of all the CFOUTPUTted #order_values#.  Is this very
> difficult?
> 
> This is what I'd like to see:
> 
> CUSTOMER        PRODUCT        ORDER VALUE
> Tom                       Apple                  100
> Dick                       Banana              200
>                                                             ------
>                                               TOTAL 300
> 
> How do I calculate the total?
> 
> Thanks in advance,
> CK.
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211412
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to