>- see footer for list info -<
your problem is you don't have a nested <cfoutput>, so it's only ever going to 
display the first bullying type for each incident, regardless of how many 
bullying types that incident has.  so something like:
<tr>
        <td align="top">
                #IncidentIDPK#
        </td>
        <cfoutput>
                <cfset span= BullyingTypeIDFK - 1>
                <cfif bullyingTypeIDFK GT 1>
                        <td align="top" colspan=#span#></td>
                        <td>
                                #BullyingType#
                        </td>
                <cfelse>
                        <td>
                                #BullyingType#
                        </td>
                </cfif>
        </cfoutput>
</tr>

Duncan Cumming
New Media Developer
Customer Relations Management / Education
Fife Council
700 4105 / 01592 414105

>>> [EMAIL PROTECTED] 18/10/2006 12:57 >>>
>- see footer for list info -<
So close ......

I have this sort of working now but It misses off the second cell on the 
first row .....
I think I need to make the colums loop ....?

Here's what I have ....

<cfquery name="Report1" datasource="#Application.RacistDSN#">
                        SELECT tblIncidents.IncidentIDPK,
                                tblIncidents.DFESNo,
                                tblIncidents.IncidentDate,
                                tblIncidentToBullying.BullyingTypeIDFK,
                                tblBullyingTypes.BullyingType
                        FROM tblIncidentToBullying
                        INNER JOIN tblBullyingTypes ON 
tblIncidentToBullying.BullyingTypeIDFK = 
tblBullyingTypes.BullyingTypeIDPK
                        INNER JOIN tblIncidents ON 
tblIncidentToBullying.IncidentIDFK = 
tblIncidents.IncidentIDPK
                        ORDER BY IncidentIDPK
                </cfquery>



<cfoutput Query="Report1" group="IncidentIDPK">
                                <tr>
                                        <td align="top">
                                                #IncidentIDPK#
                                        </td>
                                                <cfset span= #BullyingTypeIDFK# 
- 1>
                                                        <cfif 
#bullyingTypeIDFK# GT 1>
                                                                <td align="top" 
colspan=#span#></td>
                                                                <td>
                                                                        
#BullyingType#
                                                                </td>
                                                        <cfelse>
                                                                <td>
                                                                        
#BullyingType#
                                                                </td>
                                                        </cfif>
                                </tr>
                        </cfoutput>


To recap the data looks like this ...

243     1
243     6
244     3
245     1
246     1

How do I seperate the grouping on the query so that I can loop the columns 
....?

You can see it here (The Other is missing (#6) from the first row)

http://www.bgfl.org/cfpages/bullying/ShowReport.cfm?RepID=1 

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 -<


**********************************************************************
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed and 
should not be disclosed to any other party. 
If you have received this email in error please notify your system manager and 
the sender of this message.

This email message has been swept for the presence of computer viruses but no 
guarantee is given that this e-mail message and any attachments are free from 
viruses.

Fife Council
Tel: 08451 55 00 00
************************************************

_______________________________________________

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 -<

Reply via email to