I have a program which produces output as follows:

 

Projects                       Jul 2006    Aug    Sept       Total
  
  
 Project 1 - revenue:         $1,500.00    500     500    
  
 Project 2 - revenue:         $1,000.00
   
 Project 3 - revenue:         $  500.00
 
 
Total Revenues:               $3,000.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. 

Basically what has been done previously by someone is that they created a table 
for the name of the projects on the left and then a new table for each month 
that is outputted.  The number of rows to be produced for a month is determined 
by the number of projects underway.  This table is looped obver so as to 
produce the correct number of rows. I think an array(s) is one approach to take 
but am struggling with this one a little - look forward to suggestions.

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.

 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291305
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