![]() |
| |||||||
![]() | « Previous Thread | Next Thread » |
| | LinkBack | Thread Tools | Display Modes |
| Sponsored Links |
| ||||
| Belle, I don't understand what you're asking ![]() Posting your current code would be helpful, as well. ![]()
__________________ jmurrayhead Did I help you out? Make me popular by clicking the icon!If you found a post helpful, please click the button in the lower right-hand corner of the post.Powered by ASP.Net |
| ||||
| okies ...here it is:The strQ1Shipped is not lining up with the correct row in the asp display. it's starting on the 2nd tool....The number is correct, just needs to start on 1st tool. Code: <%
strLastTools = ""
do while not rs.EOF
if i > iStopRec then
exit do
end if
strTools = rs("Tools")
strQ1 = rs("OnOrder1")
strQ1Shipped = strQ1Shipped + rs("SumShipped")
strQ2 = rs("OnOrder2")
strQ3 = rs("OnOrder3")
strQ4 = rs("OnOrder4")
strToolID = rs("ToolID")
If strTools<>strLastTools Then
Response.Write("<tr><td colwidth=""150""><b>" & strTools & "</b></a></td>")
Response.Write("<td align=center colwidth=""50""><b>" & strQ1 & "</b></td>")
strQ1 = 0
If strQ1Shipped <> 0 then
Response.Write("<td align=center colwidth=""50""><A href=""//server/test/ShipResults.asp?ToolID=" & strToolID &"""><b>" & strQ1Shipped & "</b></a></td>")
strQ1Shipped = 0
Else
Response.Write("<td align=center colwidth=""50""><b>" & strQ1Shipped & "</b></td>")
strQ1Shipped = 0
End If
Response.Write("<td align=center colwidth=""50""><b>" & strQ2 & "</b></td>")
strQ2 = 0
Response.Write("<td align=center colwidth=""50""><b>" & strQ3 & "</b></td>")
strQ3 = 0
Response.Write("<td align=center colwidth=""50""><b>" & strQ4 & "</b></td></tr>")
strQ4 = 0
End If
strLastTools = strTools
%>
<%
i = i + 1
rs.MoveNext
loop
%>
|
| ||||
| In the ToolName column, do you want Tools to repeat themselves? i.e.: Code: ToolName Q1Build Q1Shipped Q2Build Q3Build Q4Build Tool1 1 BLANK(skipped) 3 3 2 Tool1 1 2 3 2 2 Tool2 3 2 (this is suppose 2 go with Tool1) 3 2 2 Tool3 2 1 (this is suppose 2 go with Tool2) 3 3 4 |
| ||||
| Hi JMH, Nope, grouping toolname and the onorder/build columns. Code: instead of this: tool1---------1---------blank---------3--------3------2 tool2---------3-----------2-----------3--------2------2 tool3---------2-----------1-----------3--------3------4 want this: tool1---------1-----------2---------3--------3------2 tool2---------3-----------1-----------3--------2------2 tool3---------2-----------3-----------3--------3------4 |
| ||||
| Hey again JMH, ![]() i have this in my asp: Code: sSQL = "Select ToolID,Tools,CurrentMoYr,OnOrder1,OnOrder2,OnOrder3,OnOrder4,MoID,RolloutShipped,Sum(case when [MoID] between 1 and 3 then (IsNull([RolloutShipped],0)) end) as SumShipped from vwHistory where 1=1 Group By ToolID,Tools,CurrentMoYr,OnOrder1,OnOrder2,OnOrder3,OnOrder4,MoID,Rolloutshipped Order By " & sOrderBy & " " & sOrderByDir |
| ||||
| Quote:
Have you tried running this in Query Analyzer? If so, what were the results? |
| ||||
| hope this helps explain more.... I was pulling from both tables .... the history table and the tool table...which there will be more tools in my tool table than in my history table (which would be nice to see but not necessary...they'll eventually show up in the history table once they have history data)....so i changed that join. when i used the sql statement in the analyzer for toolID=1, i get results: Code: ToolID----ToolName----OnOrder1----SumShipped----MoID 1---------Tool1----------3------------0--------------1 1---------Tool1----------3------------1--------------2 1---------Tool1----------3------------1--------------3 right now my asp display looks like: Code: ToolName-----Q1Build------Q1Shipped Tool5----------2-------------BLANK Tool7----------4---------------3 Tool1----------3---------------5 Tool3----------2---------------2 Last edited by Rebelle; June 26th, 2008 at 08:12 PM. Reason: added asp display |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
| Sponsored Links |
| ASP.NET Resource Index a directory of ASP.NET tutorials, applications, scripts, assemblies and articles for the novice to professional developer. Free Web Directory Including Chats and Forums Resources, Offer automatic, instant and free directory submissions. | URLZ Web Directory URLZ Web Directory Free Web Directory - Add Your Link The Little Web Directory | Free Web Directory Pegasus free web directory is a free directory organised by categories. Web Directory & SEO Services dirroot web directory |