Cumulative Totals...
I'm not quite the seasoned pro, but have been working with CF for about 5 years and usually can get it to do what I want. I thought this would be relatively easy (and prob is to you) to add cumulative costs in the right column of a balance sheet type output, but it's kicked my butt long enough..lol
Just need it to sum cumulative costs of the items selected, in the order sorted. I've tried varying ways to get this to add and display like I need, dbqueries, loop indexes, using recordcount/currentrow calculations, etc, etc...no joy ![]()
Appreciate your time...really! ![]()
<form...select...etc>
<cfquery name="getcosts" datasource="xxx">
SELECT *
FROM costs
ORDER by '#form.sortby#'
</cfquery>
<cfoutput query="getcosts">
*displays columns for #item_name#, #item_cost#, and cumulative cost* based on output sort order
</cfquery>
