William,
Thanks for the tip.  I have since made that change to my SQL, but I'm still 
getting the same non-grouping results.  My current sql and output code are 
below.  Thanks for any help.

John

<cfquery name ="qryWIRDate" datasource="#Session.PMDBDataSource#">
SELECT
        'Date' as ReportGroup
    , convert(datetime, convert(varchar, SCTicket.OutageStart, 104),104) as 
OutageDate
        , SCTicket.OutageStart
        , SCTicket.OutageEnd
        , '1' as SortField
        , Pri.Abbrev
        , SCTicket.SCTicket
        , SCTicket.IssueTitle
        , SCTicket.RootCause
        , SCTicket.Impact
        , SCTicket.Resolution
        , SCTicket.ResultOfChange
        , CASE WHEN SCTicket.ResultOfChange = '1' THEN ', Result Of Change' END 
as ROCIndicator
FROM
        tblSCTicket SCTicket
                INNER JOIN tblPriorities Pri
                        ON SCTicket.PriorityID = Pri.PriorityID
WHERE  (SCTicket.SCDateEntered between '#Start#' and '#End#')
AND SCTicket.SCTicket = '#aryDistTckts[i]#'
  ORDER BY OutageDate, OutageStart,
        SCTicket
</cfquery>

<cfoutput query="qryWIRDate" group="OutageDate">
<P></P>
#DateFormat(OutageDate, "dddd, mm-dd-yy")#

        <cfoutput>
                <table class="ticket">
                <tr>
                        <th>When:</th>
                        <td>#DateFormat(OutageStart, "mm/dd/yy")# from 
#TimeFormat(OutageStart, "h:mm tt")# until #TimeFormat(OutageEnd, "h:mm 
tt")#</td>
                </tr>
                <tr>
                        <th>Priority:</th>
                        <td>#Abbrev#, #SCTicket# #ROCIndicator#</td>
                </tr>
                <tr>
                        <th>Brief Description:</th>
                        <td>#IssueTitle#</td>
                </tr>
                <tr>
                        <th>Cause:</th>
                        <td>#RootCause#</td>
                </tr>
                <tr>
                        <th>Resolution:</th>
                        <td>#Resolution#</td>
                </tr>
                </table>
        </cfoutput>

</cfoutput>

>You are sorting by the OutageStart but the 'convert' is creating OutageDate.
>
>In order to 'group' by the OutageDate, you should be sorting by the
>OutageDate, not the OutageStart.
>
>William


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3864
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to