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

Reply via email to