Click to visit our sponsors |
Advertise with us!
Home
Tutorials
Add Tutorial
Search Tutorials
Browse Tutorials
Browse By Author
Video Tutorials
Forums
ColdFusion Jobs
ColdFusion Reference
ColdFusion Developers
Add Developer Profile
Browse ColdFusion Developer Profiles
Advertise
About Us
ColdFusion Blog
View The 3 New EasyCFM.COM ColdFusion Tutorials Posted
Thursday, September 9, 2010 8:12 PM
Tutorials added within the last 30 days!
Tutorial
Views
Using JQUERY to Detect an End of Session event
996
JQuery & Coldfusion Username Check Utility
1,015
Preventing People From Leeching Your Images!
48,036
Close Preview
|
View All Tutorials
EasyCFM.COM Forum
/
Coding Help!
/ Subtotal Array Within Output Group
Login
Join
Search
Reply to Discussion
|
New Discussion
<<
previous
||
next
>>
Posted By
Discussion Topic: Subtotal Array Within Output Group
jaco5md
03-09-2010 @ 9:22 AM
Reply
Edit
Profile
Send P.M.
Powered by
Gravatar
Senior Member
Posts: 490
Joined: Jul 2005
I am trying to get subtotals for each column in my array (arrRegionDetail[currentrow][6]...) within a specific grouping and cannot figure out how. All code I use give me different data no matter where I place it within the output statement.
<!--- Display Parent Data (Group 2) --->
<cfoutput group=
"uic_id"
>
<tr>
<td height=
"20"
class=
"MTFHeading"
>
<div style=
"margin-left:8px"
>
#name# (#uic_id#)
</div>
</td>
<td class=
"MTFHeadingNum"
>
</td>
<td class=
"MTFHeadingNum"
>
</td>
<td class=
"MTFHeadingNum"
>
</td>
<td class=
"MTFHeadingNum"
>
</td>
<td class=
"MTFHeadingNum"
>
</td>
<td class=
"MTFHeadingNum"
>
</td>
<td class=
"MTFHeadingNum"
>
</td>
</tr>
<!--- Display Child Data --->
<cfoutput>
<tr bgcolor=
"###iif(currentrow MOD 2,DE('ffffff'),DE('FAF8F5'))#"
>
<td height=
"20"
class=
"MTFSubHeading"
>
<div style=
"margin-left:15px"
>
#child_name# (#uic_child_id#)
</div>
</td>
<td class=
"MTFSubHeadingNum"
>
#arrRegionDetail[currentrow][6]#
</td>
<td class=
"MTFSubHeadingNum"
>
#arrRegionDetail[currentrow][7]#
</td>
<td class=
"MTFSubHeadingNum"
>
#arrRegionDetail[currentrow][8]#
</td>
<td class=
"MTFSubHeadingNum"
>
#arrRegionDetail[currentrow][9]#
</td>
<td class=
"MTFSubHeadingNum"
>
#arrRegionDetail[currentrow][10]#
</td>
<td class=
"MTFSubHeadingNum"
>
#arrRegionDetail[currentrow][11]#
</td>
<cfset GrandDetailTotal =
#arrRegionDetail[currentrow][6]#
+ #arrRegionDetail[currentrow][7]# + #arrRegionDetail[currentrow][8]# +
#arrRegionDetail[currentrow][9]# + #arrRegionDetail[currentrow][10]# + #arrRegionDetail[currentrow][11]#>
<td class=
"MTFSubHeadingNumTotal"
>
<div style=
"margin-right:20px; text-align:right"
>
#NumberFormat(GrandDetailTotal, "," )#
</div>
</td>
</tr>
</cfoutput>
</cfoutput>
-David
"Rock 'n' Roll 4 Ever"
nmiller
03-09-2010 @ 10:19 AM
Reply
Edit
Profile
Send P.M.
Powered by
Gravatar
Moderator
Posts: 756
Joined: Apr 2003
You don't want to use an array at all, you want to use
output grouping:
http://tutorial150.easycfm.com/
reformat your code to use this technique.
Nathan Miller
NM Consulting
Coding Help!
-- Coding Help!
-- Application Beta Testing Area!
-- Good Coding Tips!
Other Adobe Products
-- Dreamweaver
-- Flash Development
-- Flex Development
Database Help
-- MS Access Related Issues
-- MS SQL Server Related Issues
-- MySQL Related Issues
-- Oracle Related Issues
-- Other
ColdFusion Server/Applications
-- ColdFusion Server
-- ColdFusion Applications
General Area
-- General Discussion
-- New Users Area!
-- Feedback Area
-- Site Stuff!
-- Polls
Code Conversion Help
-- ASP to CFML
-- CGI to CFML
-- .NET to CFML
-- JSP to CFML
-- PHP to CFML
ColdFusion Hosting
-- ColdFusion Hosting
EasyCFM.COM Tutorials Area
-- Tutorial Requests!
-- Bug Reports!
Free ColdFusion Hosting
-- Hosting Support
-- Requests
Developers Work Showcase!
-- Work Showcase!
ColdFusion Jobs / ColdFusion Careers
-- ColdFusion Related Jobs
Administrators & Moderators
-- Administrators & Moderators Only
--- Log In
--- Register
--- Search
Copyright © 2002 - 2009. EasyCFM.COM, LLC.
Powered by
< CF FORUM >
v.2.0
ADVERTISEMENT