Hello. I have a slight problem. I am trying to take the following values from a table. \r\n \r\n<% if rs("wip") >0 then %> \r\n<td align="middle" nowrap> \r\n<small> \r\n \r\n<%= rs("wip")%>/<%= rs1("wordphrase")%> \r\n \r\n<font color=blue> \r\n<%=round( rs("wip")/rs1("wordphrase")*100)%>% \r\n</font> \r\n</small> \r\n</td> \r\n<% else %> \r\n<td align="middle" nowrap> \r\n<small> \r\n n/a \r\n<font color=blue> \r\n</font> \r\n</small> \r\n</td> \r\n<% end if %> \r\n \r\nThe part in orange is what I need to sum then divide by the count of the rows displayed. I\'ve done stuff that works for other parts server side, the problem is that the data in the "wip"/"wordphrase" can change year to year. These are test results. \r\n \r\nFor example a wordphrase taken in 2000 might contain 6 total questions \r\nbut in 2001 wordphrase might contain 8 total questions \r\neither way 3/6 and 4/8 are still 50%, but I can\'t rely on counting the possible questions right-to-total questions because each year the data changes. This is why I\'m trying to figure out how to capture the round( rs("wip")/rs1("wordphrase")*100) data that is displayed and then add those up and divide by the total rows for that data that are displayed. \r\n \r\nIf there\'s a way to do it serverside I\'d rather do that, but for now clientside will be good enough. If you can at least point me in the right direction so that I can then understand this better I would greatly appreciate it, because later I have to further separate it by gender and race. Thanks.
Hello. I have a slight problem. I am trying to take the following values from a table.
<% if rs("wip") >0 then %>
<td align="middle" nowrap>
<small>
<%= rs("wip")%>/<%= rs1("wordphrase")%>
<font color=blue>
<%=round( rs("wip")/rs1("wordphrase")*100)%>%
</font>
</small>
</td>
<% else %>
<td align="middle" nowrap>
<small>
n/a
<font color=blue>
</font>
</small>
</td>
<% end if %>
The part in orange is what I need to sum then divide by the count of the rows displayed. I've done stuff that works for other parts server side, the problem is that the data in the "wip"/"wordphrase" can change year to year. These are test results.
For example a wordphrase taken in 2000 might contain 6 total questions
but in 2001 wordphrase might contain 8 total questions
either way 3/6 and 4/8 are still 50%, but I can't rely on counting the possible questions right-to-total questions because each year the data changes. This is why I'm trying to figure out how to capture the round( rs("wip")/rs1("wordphrase")*100) data that is displayed and then add those up and divide by the total rows for that data that are displayed.
If there's a way to do it serverside I'd rather do that, but for now clientside will be good enough. If you can at least point me in the right direction so that I can then understand this better I would greatly appreciate it, because later I have to further separate it by gender and race. Thanks.
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET. subscribe