Where is the data coming from in the first place.

This type of data would normally come from a query or array.

Array Rows

<cfset rows = arrayLen(arrayName) />

Query Rows

<cfset rows = queryName.recordCount />

Does that help, can help more if I know where the data is coming from.

Regards
Dale Fraser

http://learncf.com

-----Original Message-----
From: Peter Tanswell [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 17 October 2007 8:52 PM
To: CF-Talk
Subject: Row total columns

Hi there


I have a program which produces output as follows:



  *Projects*
   Project 1 - revenue:
   Project 2 - revenue:


 Project 3 - revenue:

 Total Revenues:   Jul
2006 *month*  *$*1,500.00 *BBB*
  *$*0.00 *BBB*
   *$*0.00 *BBB*
   *$1,500.00*

























Its calculating the column totals correctly,  (only shown July but it shows
Jul-June) - with a Total column at the end - but I am struggling a little on
the best approach so as to calculate the row totals.



I am thinking of creating an array, and then each time I get a new column I
add the value in question to the array (I know that there will always be 12
columns).  I'm stumped though on determining the number of rows - there
could be 3 or there could be 23.



How would you recommend handling this.  Is it as simple as just setting up
an array or would you suggest a better approach?



Thanks in advance.




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291306
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to