>- see footer for list info -<
Wouldn't you want the group on the outer cfoutput ?

Alex

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Swingewood
Sent: 16 October 2006 13:53
To: [email protected]
Subject: RE: [CF-Dev] Grouping and formatting ...?

>- see footer for list info -<
This doesn't do what I expected.... It does what I had anyway .....

http://www.bgfl.org/cfpages/bullying/_report.cfm?repid=1

Regards - Paul


>From: "Snake" <[EMAIL PROTECTED]>
>Reply-To: Coldfusion Development <[email protected]>
>To: "'Coldfusion Development'" <[email protected]>
>Subject: RE: [CF-Dev] Grouping and formatting ...?
>Date: Mon, 16 Oct 2006 13:00:34 +0100
>
> >- see footer for list info -<
>Under each section you just need to do a grouped cfouput, grouping by the
>column that you wish to use as a heading.
>
>E.G.
><cfoutput query="report1">
><h2>#IncidentIDPK#</h2>
><cfoutput group="IncidentIDPK">
>   yourfields here
></cfoutput>
></cfoutput>
>
>
>Russ
>
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] On Behalf Of Paul Swingewood
>Sent: 16 October 2006 12:52
>To: [email protected]
>Subject: [CF-Dev] Grouping and formatting ...?
>
> >- see footer for list info -<
>Hi all I have never really understood grouping etc and could do with a
>little help (Again..!)
>
>I want to display a report like this
>
>Incident Ref No     Racist    Homophobic   Disabilist    Religiously
>Motivated   Cyber   Other
>      414                  1              1                1
>
>0                       0          1
>
>I have 3 tables joined to get the data
>
>tblincidents
>IncidentIDPK
>DFESNO
>IncidentDate
>
>tblIncidentToBullying
>BullyingTypeIDPK
>IncidentIDFK
>BullyingTypeIDFK
>
>tblBullyingTypes
>BullyingTypeIDPK
>BullyingType
>FormPosition
>
>
>It could be (and probably will be) that there are several types of bullying
>for each incident (hence the incident to bullying table. So the output 
>might
>produce something like :
>
>Incident 414
>
>Racists
>Homophobic
>Other
>
>I then want this to arrange on one line so that its shown (and counted) as
>one incident!
>
>This is waht I have ....
>
>
><!--- 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
>               </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>
>                               <td align="top">
>                                       Racist
>                               </td>
>                               <td align="top">
>                                       Homophobic
>                               </td>
>                               <td align="top">
>                                       Disabilist
>                               </td>
>                               <td align="top">
>                                       Religiously<br />
>                                       Motivated
>                               </td>
>                               <td align="top">
>                                       Cyber
>                               </td>
>                               <td align="top">
>                                       Other
>                               </td>
>                       </tr>
>                       <cfoutput Query="Report1">
>                               <tr>
>                                       <td align="top">
>                                               #IncidentIDPK#
>                                       </td>
>                                       <td align="top">
>                                               1
>                                       </td>
>                                       <td align="top">
>                                               1
>                                       </td>
>                                       <td align="top">
>                                               1
>                                       </td>
>                                       <td align="top">
>                                               1
>                                       </td>
>                                       <td align="top">
>                                               1
>                                       </td>
>                                       <td align="top">
>                                               1
>                                       </td>
>                               </tr>
>                       </cfoutput>
>               </table>
>       </cfcase>
></cfswitch>
>
>
>Can anyone help me organise this properly please?
>
>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
> >-<
>
>
>_______________________________________________
>
>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 
>-<


_______________________________________________

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


_______________________________________________

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