![]() |
| |||||||
| Sponsored Links |
![]() |
| | LinkBack | Thread Tools | Display Modes |
|
#21
| ||||
| ||||
| Ok, I added the case statement and changed the order by. I am getting results like I want them but with one minor issue, my last region only has "repair" items but its not showing the "Repair" grouping for it. shows like: RegionOne -Ready Ready Item Ready Item -Repair Repair Item Repair Item Repair Item RegionTwo -Ready Ready Item -Repair Repair Item . . . ...then LastRegion Repair Item Repair Item Here is code, let me know if you need the query info. Code: <%
Dim strLastRegionName, strType
%>
<%
strLastRegionName = ""
strType = ""
do while not rs.EOF
if i > iStopRec then
exit do
end if
strCurrentRegionName = rs("RegionName")
If strCurrentRegionName<>strLastRegionName Then
Response.Write("<tr bgcolor=#D3D3D3><td colwidth=""100"" colspan=""10""><b>" & strCurrentRegionName & "</b></td></tr>")
End If
strLastRegionName = strCurrentRegionName
strCurType = rs("Type")
If strCurType <> strType then
Response.Write("<tr bgcolor=yellow><td colwidth=""100"" colspan=""10""><b>" & strCurType & "</b></td></tr>")
End If
strType = strCurType
i = i + 1
%>
<TR>
<TD bgcolor=#ffe4e1 align=right><%=rs("Loc")%> </TD>
<TD bgcolor=#ffe4e1 align=center><%=rs("District_Location")%> </TD>
<TD align=center><%=rs("EQStatus")%> </TD>
<TD align=center><%=rs("TrackingStatus")%> </TD>
<TD align=center><%=rs("EQNumber")%> </TD>
<TD align=center><%=rs("Tools")%> </TD>
<TD align=center><%=rs("DaysStatus")%> </TD>
<TD align=center><%=rs("DaysSinceLast")%> </TD>
<TD align=center><%=rs("CurrCC")%> </TD>
<TD align=left><%=rs("RigPartner")%> </TD>
</TR>
<%
rs.MoveNext
loop
%>
<%
rs.Close
%>
|
| Sponsored Links |
|
#22
| ||||
| ||||
| try this: Code: If strCurrentRegionName<>strLastRegionName Then
Response.Write("<tr bgcolor=#D3D3D3><td colwidth=""100"" colspan=""10""><b>" & strCurrentRegionName & "</b></td></tr>")
strType = ""
End If
__________________ Quote of the Month: Quality: The race for quality has no finish line- so technically, it's more like a death march. Questions to Ponder: What do you do when you see an endangered animal eating an endangered plant? iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright © 2008 sbenj69 |
| The Following 2 Users Say Thank You to mehere For This Useful Post: | ||
jmurrayhead (May 27th, 2008), Rebelle (June 17th, 2008) | ||
|
#23
| ||||
| ||||
| That did it!!!! Thank you! Thank you! |
|
#24
| ||||
| ||||
| np ... glad you got it sorted. |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|