I am trying to fill a grid with ASP. I have two tables open at the same time with this, we will refer to them as X and Y. I am telling it to loop through X, the main data, until it hits the end of the table. Y is going to have more than one record per record in X, so one X record may have many Y records. The Y records are going to fill into subcategory sort of deals.
Basically I am having trouble with a loop writing Y records within the X record, here's what I have right now:
Do Until Rs.EOF 'X record
Body = Body & "<tr><td colspan='5'> </td></tr>"
Body = Body & "<tr>"
Body = Body & "<td class='border' width='16.6%'> " & Rs("TicketDate") & "</td>"'Date
Body = Body & "<td class='border' width='16.6%'> " & Rs("TicketNBR") & "</td>"'Number
Body = Body & "<td class='border' width='16.6%'> " & Rs("TktTransType") & "</td>"'Status
Body = Body & "<td class='border' width='16.6%'> " & Rs("AllcTdQty") & "</td>"'Net Bushel
Body = Body & "<td class='border' width='16.6%'> " & Rs("OwnrCd") & "</td>"'Owner
Body = Body & "</tr><tr>"
'Body = Body & "<td width='16.6%'> N/A</td>"'Quality
'Quality stuff
Do until TickTemp <> Rs("TicketNbr") 'Y records
Body = Body & "<td class='border' width='16.6%'> " & Rs("GrdCd") & "</td>"
Body = Body & "</tr><p>"
Rs.MoveNext
TickTemp = Rs("TicketNbr")
Loop
Loop
I just don't get it... Does ASP have something against using a loop within a loop? That's my guess, or I have some stupid little thing I am over looking... Soooo that's that.

New Topic/Question
Reply



MultiQuote



|