Sure can, when using cfoutput and I am sure cfloop has it too, you can
output with the group attribute, this will allow you to also create the
running subtotal and display it at the end of the group.



-- 
Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/
Google+: 
http://plus.google.com/113032480415921517411<http://plus.google.com/108193156965451149543>



On Mon, Oct 1, 2012 at 3:30 PM, Chester Austin <[email protected]>wrote:

>
> Would anyone have any insight on how to output subtotals to HTML?
>
> Background:
> Given an SQL query,
> select eventcode, basecode, issued
> from mytable
> group by eventcode, basecode, issued
>
> I would like to output it to be:
> EventCode     BaseCode     Issued
> A/123         100          5
> A/123         101          10
> Subtotal                   15
> A/124         100          20
> A/124         101          10
> Subtotal                   30
>
> I've tried SQL, but my order by clause throws everything off.  Is there a
> ColdFusion way to handle this?
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352788
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to