- see footer for list info -<
Thanks for the help thus far .....
I now have .....
<!--- Get the bullying types to use as the column headers --->
<cfquery name="GetColumnHeaders" datasource="#Application.RacistDSN#">
SELECT tblBullyingTypes.BullyingTypeIDPK,
tblBullyingTypes.BullyingType
FROM tblBullyingTypes
ORDER BY BullyingTypeIDPK
</cfquery>
<!--- Which report do you want? --->
<cfswitch expression="#url.RepID#">
<cfcase value="1">
<!--- REPORT #1 --->
<!--- Get the details of report #1--->
<cfquery name="Report1" datasource="#Application.RacistDSN#">
SELECT tblIncidents.IncidentIDPK,
tblIncidents.DFESNo,
tblIncidents.IncidentDate,
tblBullyingTypes.BullyingType
FROM tblIncidentToBullying
INNER JOIN tblBullyingTypes ON tblIncidentToBullying.BullyingTypeIDFK =
tblBullyingTypes.BullyingTypeIDPK
INNER JOIN tblIncidents ON tblIncidentToBullying.IncidentIDFK =
tblIncidents.IncidentIDPK
ORDER BY IncidentIDPK
</cfquery>
<!--- HEADER --->
<!---
<cfoutput>
<table border="0" class="EDDIEitemTable" width=95%>
<tr>
<td valign="top" colspan="4">
<b>#Session.User#</b>
</td>
<td valign="top" colspan="4">
<b>#Session.DFESNo#</b>
</td>
</tr>
</table>
</cfoutput>
--->
<!--- Spacer --->
<table cellSpacing="0" cellPadding="0" width="95%" border="0">
<tr><td height="10"></td></tr>
</table>
<!--- Column Headings --->
<table style="PADDING-RIGHT: 0px;
PADDING-LEFT: 10px;
PADDING-BOTTOM: 0px;
PADDING-TOP: 0px"
cellSpacing="0" cellPadding="0" width="95%" border="1">
<tr>
<td align="top">Incident Ref No.</td>
<cfoutput query="GetColumnHeaders">
<td align="top">
#BullyingType#
</td>
</cfoutput>
</tr>
<cfoutput Query="Report1" group="IncidentIDPK">
<tr>
<td align="top">
#IncidentIDPK#
</td>
<cfoutput>
<cfswitch
expression="#BullyingType#">
<cfcase
value="Bullying">
<td
align="top">
#BullyingType#
</td>
</cfcase>
<cfcase
value="Racist">
<td></td>
<td
align="top">
#BullyingType#
</td>
</cfcase>
<cfcase
value="Homophobic">
<td></td><td></td>
<td
align="top">
#BullyingType#
</td>
</cfcase>
<cfcase
value="Disablist">
<td></td><td></td><td></td>
<td
align="top">
#BullyingType#
</td>
</cfcase>
<cfcase
value="Religiously Motivated">
<td></td><td></td><td></td><td></td>
<td
align="top">
#BullyingType#
</td>
</cfcase>
<cfcase
value="Cyber">
<td></td><td></td><td></td><td></td><td></td>
<td
align="top">
#BullyingType#
</td>
</cfcase>
<cfcase
value="Other">
<td
align="top">
#BullyingType#
</td>
</cfcase>
</cfswitch>
</cfoutput>
</tr>
</cfoutput>
</table>
</cfcase>
</cfswitch>
Which you can now see here (I commented out the session variables .... lol)
http://www.bgfl.org/cfpages/bullying/_report.cfm?repid=1
The Case is a [EMAIL PROTECTED] way of doing it. It won't work anyway because it never
knows how many blanks to put in place ..... so thats [EMAIL PROTECTED]
So I am thinking this needs an array.So something that compares what is returned in the columnheader query with whats returned in the report1 query.
If this record matches one in the column headers then get the IDPK number and store it in the array. If it doesn't store an 'x' or something to show this cell is bank....
Then stuff the array out to the table. Does this sound a better way of doing it or is there an easier way ...? Regards - Paul _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:-
- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -< - Lists hosted by www.Gradwell.com -< - CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
