I have a query which returns the follwoing data..
ORIGINATION DT CT ORDERBY ORIGIN_GROUP O1 O23 TOTAL
REPORT_GROUP
Call to Corporate May-2005 0 3 2 0 0
0 1
Call to Corporate Jun-2005 0 3 2 0 0
0 1
Direct to ECR Department May-2005 0 4 2 0
0 0 1
Direct to ECR Department Jun-2005 0 4 2 0
0 0 1
Letter To Corporate May-2005 0 5 2 0 0
0 1
Letter To Corporate Jun-2005 0 5 2 0 0
0 1
Letter To Executive May-2005 0 6 3 0 0
0 1
Letter To Executive Jun-2005 0 6 3 0 0
0 1
Attorney Generals Office May-2005 0 8 1 0
0 0 2
Attorney Generals Office Jun-2005 0 8 1 0
0 0 2
Better Business Bureau May-2005 0 9 1 0 0
0 2
Better Business Bureau Jun-2005 0 9 1 0 0
0 2
FCC May-2005 0 10 1 0 0 0 2
FCC Jun-2005 0 10 1 0 0 0 2
Other Agency May-2005 0 11 1 0 0 0
2
Other Agency Jun-2005 0 11 1 0 0 0
2
I'm trying to output the data in an html table.
I have this so far
Origination May-2005 Jun-2005
Call to Corporate 0 0
Direct to ECR Department 0 0
Letter To Corporate 0 0
Letter To Executive 0 0
Attorney Generals Office 0 0
Better Business Bureau 0 0
FCC 0 0
Other Agency 0 0
using a QoQ but what I'm having a problem with is after Letter to
Executive I need a subtotal of the numbers above it. I added the
column 'o23' for this. This returns a subtotal of the columns where
origin_group equals 2 or 3. And then after the last one Other Agency I
need to output the o1 column data as it's a subtotal of the columns
where origin_group equals 1.
The code looks like this so far..
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<th scope="col">Origination</th>
<cfloop list="#dtlst#" index="i">
<th nowrap><cfoutput>#i#</cfoutput></th>
</cfloop>
</tr>
<cfoutput query="getit" group="origination">
<tr valign="top" class="#IIF(getit.currentrow MOD 2 EQ
0,"'even'","'odd'")#">
<td nowrap>#getit.origination#</td>
<cfoutput>
<td align="center">
#getit.ct#
</td>
</cfoutput>
</tr>
</cfoutput>
</table>
I've tried grouping by different things, namely the report_group
column 1 = origin_group 2 or 3, 2 equals origin_group 1.
Any help would be appreciated as I'm at a lost.
-- Auxilium meum a Domino
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:209197
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54