|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#16
|
|||
|
|||
|
Thanks Matt,
I've been trying it also with the help of a colleague and we also found a way to do the sorting from a recordset. I am going to try the code you sent me and I'll see what is going to happen. If you have another email where I can always email you for questions, and of course if you don't mind, send it to me please. I might have some java questions in the future. The server side language I use is VB scripting and I use Java on the client side only. Thanks again and I always appreciate your help. [This message has been edited by Chad (edited November 02, 2000).] |
|
#17
|
|||
|
|||
|
Hi Matt,
I have couple questions for you : 1st- The code you modified for me works great if the header and the details of the report are in the same <div></div>. What if I have the header and the details in the same table but in 2 seperate divs, How can I make the same code to work for me? 2nd- and this is the hardest part, What if I have the header in a seperate Div, and part1 of the data(field1 for example) in a second Div, and part2(field2 for example) of the data in a third div. How can I apply the same code you modified to this situation. I think by answering the second question, the first one will be answered. Can you help me with this, if so, please send me a piece of code that will help me figure that out. Thanks again for your help [This message has been edited by Chad (edited November 07, 2000).] |
|
#18
|
|||
|
|||
|
I don't really understand what you're asking. Why do you need all the different divs? If your results are in a table anyway, why do you need to have divs within that table?
|
|
#19
|
|||
|
|||
|
Hi Matt,
In the report I am generating I am displaying about 10 fields from the database across the screen. Some of those fields are very long (too many characters to display). In order for me to display all these fields on the screen without having the user to scroll to the right I put every 2 or 3 fields in a separate Div and each div has its own horizontal scroll bar. Also the headers for the report are in separate Divs too. So when I click on the header in Div1 for example I need to sort the data in all the divs. If this still not clear enough please let me know. Is this Doable ? Thanks again. |
|
#20
|
|||
|
|||
|
You should be able to do it. I was only using the div in my code as a 'container' to hold html and allow it to be updated (i.e. when you do a sort).
Modify this piece of code - output = '<TABLE BORDER=1>'; output += '<TR>' + '<TH><A HREF=' + str1 + '>number</A></TH>' + '<TH><A HREF=' + str2 + '>text</A></TH>' + '<TH><A HREF=' + str3 + '>date</A></TH>' + '<TH><A HREF=' + str4 + '>name</A></TH>' + '</TR>'; for (var i=0; i<length; i++) output += '<TR>' + '<TD>' + object[i].number+ '</TD>' + '<TD>' + object[i].text + '</TD>' + '<TD>' + object[i].date + '</TD>' + '<TD>' + object[i].name + '</TD>' + '</TR>'; output += '</TABLE>'; - to contain all your html output (divs and all) and then still output it to a 'container' div like we have done. I don't think it should make a difference whether its just a plain old table (like in the example) or more complicated html that you write to the container div. Try it and see what happens..... |
|
#21
|
|||
|
|||
|
Matt,
I think it is a little bit complicated than that. Here is the HTML code I have : rst.Open strSQL, Conn Response.Write("<TABLE align=center border=0 cellpadding=0 cellspacing=0>") Response.Write("<TR bgcolor='#D7D3CA'>") Response.Write("<td>") Response.Write("<div id=dHeader1 style=""position:relative;overflow-x:hidden;overflow-y:hidden;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("<table border=0 width=180 cellpadding=0 cellspacing=0>") if sLevel = "No" Then Response.Write("<col width=40><col width=40><col width=100>") Else Response.Write("<col width=40><col width=100>") End if Response.Write("<tr>") Response.Write("<td valign=Bottom><font face='arial' size=1 color='black'>Center</font></td>") if sLevel = "No" Then 'Day Over Day Report Response.Write("<td valign=Bottom align=center><font face='arial' size=1 color='black'>Date</font></td>") End if Response.Write("<td valign=Bottom align=center><font face='arial' size=1 color='black'>Bu </font></td>") Response.Write("</tr>") Response.Write("</table>") Response.Write("</div>") Response.Write("</td>") Response.Write("<td>") Response.Write("<div id=dHeader2 style=""position:relative;overflow-x:hidden;overflow-y:hidden;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("<table border=0 width=180 cellpadding=0 cellspacing=0>") Response.Write("<col width=180>") Response.Write("<tr>") Response.Write("<td valign=Bottom><font face='arial' size=1 color='black'> Sub Bu</font></td>") Response.Write("</tr>") Response.Write("</table>") Response.Write("</div>") Response.Write("</td>") Response.Write("<td>") Response.Write("<div id=dHeader3 style=""position:relative;overflow-x:hidden;overflow-y:hidden;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("<table border=0 width=150 cellpadding=0 cellspacing=0>") Response.Write("<col width=40><col width=110>") Response.Write("<tr>") Response.Write("<td valign=Bottom><font face='arial' size=1 color='black'> Dnis</font></td>") Response.Write("<td valign=Bottom><font face='arial' size=1 color='black'>Segment</font></td>") Response.Write("</tr>") Response.Write("</table>") Response.Write("</div>") Response.Write("</td>") Response.Write("<td>") Response.Write("<div id=dHeader4 style=""position:relative;overflow-x:hidden;overflow-y:hidden;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("<table border=0 width=180 cellpadding=0 cellspacing=0>") Response.Write("<col width=180>") Response.Write("<tr>") Response.Write("<td valign=Bottom><font face='arial' size=1 color='black'> Sub Segment</font></td>") Response.Write("</tr>") Response.Write("</table>") Response.Write("</div>") Response.Write("</td>") Response.Write("<td>") Response.Write("<div id=dHeader5 style=""position:relative;overflow-x:hidden;overflow-y:hidden;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("<table border=0 width=260 cellpadding=0 cellspacing=0>") Response.Write("<col width=260>") Response.Write("<tr>") Response.Write("<td valign=Bottom><font face='arial' size=1 color='black'> Description</font></td>") Response.Write("</tr>") Response.Write("</table>") Response.Write("</div>") Response.Write("</td>") Response.Write("<td>") Response.Write("<div id=dHeader6 style=""position:relative;overflow-x:hidden;overflow-y:scroll;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("<table border=0 width=225 cellpadding=0 cellspacing=0>") Response.Write("<col width=45><col width=45><col width=55><col width=40><col width=40>") Response.Write("<tr>") Response.Write("<td valign=Bottom align=right><font face='arial' size=1 color='black'> Nco</font></td>") Response.Write("<td valign=Bottom align=right><font face='arial' size=1 color='black'>Nch</font></td>") Response.Write("<td valign=Bottom align=right><font face='arial' size=1 color='black'>Aba%</font></td>") Response.Write("<td valign=Bottom align=right><font face='arial' size=1 color='black'>Asa</font></td>") Response.Write("<td valign=Bottom align=right><font face='arial' size=1 color='black'>Priority</font></td>") Response.Write("</tr>") Response.Write("</table>") Response.Write("</div>") Response.Write("</td>") Response.Write("</TR>") Response.Write("<TR>") 'code goes here for testing for records in the table If rst.EOF Then Response.Write("<td>") Response.Write("<div id=dReport1 style=""position:relative;overflow-x:hidden;overflow-y:hidden;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("</div>") Response.Write("</td>") Response.Write("<td>") Response.Write("<div id=dReport2 style=""position:relative;overflow-x:hidden;overflow-y:hidden;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("</div>") Response.Write("</td>") Response.Write("<td>") Response.Write("<div id=dReport3 style=""position:relative;overflow-x:hidden;overflow-y:hidden;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("</div>") Response.Write("</td>") Response.Write("<td>") Response.Write("<div id=dReport4 style=""position:relative;overflow-x:hidden;overflow-y:hidden;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("</div>") Response.Write("</td>") Response.Write("<td>") Response.Write("<div id=dReport5 style=""position:relative;overflow-x:hidden;overflow-y:hidden;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("</div>") Response.Write("</td>") Response.Write("<td>") Response.Write("<div id=dReport6 style=""position:relative;overflow-x:hidden;overflow-y:scroll;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("<p>Sorry, there are no matching records.</p>") Response.Write("</div>") Response.Write("</td>") Else if sLevel = "No" Then 'Day Over Day Report Response.Write("<td>") Response.Write("<div id=dReport1 style=""position:relative;overflow-x:scroll;overflow-y:hidden;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("<table border=0 width=180 cellpadding=0 cellspacing=0>") Response.Write("<col width=40><col width=40><col width=100>") HoldColor = "#E0FFFF" Do While Not rst.EOF if HoldColor = "#FFFFCC" Then HoldColor = "#E0FFFF" Else HoldColor = "#FFFFCC" End if If (rst("NCO") <> 0 And not isnull(rst("NCO"))) Then If not isnull(rst("NCH")) Then ABACal = ((rst("NCO") - rst("NCH"))/rst("NCO")) * 100 Else ABACal = 0 End if Else ABACal = 0 End if If CDbl(ABACal) >= CDbl(sABA) Then Response.Write("<tr bgcolor="&HoldColor&">") 'style=""border-bottom:1px solid black"" Response.Write("<td valign=bottom ><font face='arial' size=1 color='black'><b>" & rst("CENTER_ID") & "</b></font></td>") Response.Write("<td valign=bottom align=center><font face='arial' size=1 color='black'><b>" & rst("DATE") & "</b></font></td>") Response.Write("<td valign=bottom align=right><font face='arial' size=1 color='black'><b>" & rst("BU_NAME") & " </b></font></td>") Response.Write("</tr>") End if rst.MoveNext Loop Response.Write("</table>") Response.Write("</div>") Response.Write("</td>") Response.Write("<td>") Response.Write("<div id=dReport2 style=""position:relative;overflow-x:scroll;overflow-y:hidden;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("<table border=0 width=180 cellpadding=0 cellspacing=0>") Response.Write("<col width=180>") HoldColor = "#E0FFFF" rst.MoveFirst Do While Not rst.EOF if HoldColor = "#FFFFCC" Then HoldColor = "#E0FFFF" Else HoldColor = "#FFFFCC" End if If (rst("NCO") <> 0 And not isnull(rst("NCO"))) Then If not isnull(rst("NCH")) Then ABACal = ((rst("NCO") - rst("NCH"))/rst("NCO")) * 100 Else ABACal = 0 End if Else ABACal = 0 End if If CDbl(ABACal) >= CDbl(sABA) Then Response.Write("<tr bgcolor="&HoldColor&">") Response.Write("<td valign=Bottom ><font face='arial' size=1 color='black'><b> " & rst("SUB_BU_NAME") & " </b></font></td>") Response.Write("</tr>") End if rst.MoveNext Loop Response.Write("</table>") Response.Write("</div>") Response.Write("</td>") Response.Write("<td>") Response.Write("<div id=dReport3 style=""position:relative;overflow-x:scroll;overflow-y:hidden;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("<table border=0 width=150 cellpadding=0 cellspacing=0>") Response.Write("<col width=40><col width=110>") HoldColor = "#E0FFFF" rst.MoveFirst Do While Not rst.EOF if HoldColor = "#FFFFCC" Then HoldColor = "#E0FFFF" Else HoldColor = "#FFFFCC" End if If (rst("NCO") <> 0 And not isnull(rst("NCO"))) Then If not isnull(rst("NCH")) Then ABACal = ((rst("NCO") - rst("NCH"))/rst("NCO")) * 100 Else ABACal = 0 End if Else ABACal = 0 End if If CDbl(ABACal) >= CDbl(sABA) Then Response.Write("<tr bgcolor="&HoldColor&">") Response.Write("<td valign=Bottom ><font face='arial' size=1 color='black'><b> " & rst("DNIS") & "</b></font></td>") Response.Write("<td valign=Bottom ><font face='arial' size=1 color='black'><b>" & rst("SEG_NAME") & " </b></font></td>") Response.Write("</tr>") End if rst.MoveNext Loop Response.Write("</table>") Response.Write("</div>") Response.Write("</td>") Response.Write("<td>") Response.Write("<div id=dReport4 style=""position:relative;overflow-x:scroll;overflow-y:hidden;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("<table border=0 width=180 cellpadding=0 cellspacing=0>") Response.Write("<col width=180>") HoldColor = "#E0FFFF" rst.MoveFirst Do While Not rst.EOF if HoldColor = "#FFFFCC" Then HoldColor = "#E0FFFF" Else HoldColor = "#FFFFCC" End if If (rst("NCO") <> 0 And not isnull(rst("NCO"))) Then If not isnull(rst("NCH")) Then ABACal = ((rst("NCO") - rst("NCH"))/rst("NCO")) * 100 Else ABACal = 0 End if Else ABACal = 0 End if If CDbl(ABACal) >= CDbl(sABA) Then Response.Write("<tr bgcolor="&HoldColor&">") Response.Write("<td valign=Bottom ><font face='arial' size=1 color='black'><b> " & rst("SUB_SEG_NAME") & " </b></font></td>") Response.Write("</tr>") End if rst.MoveNext Loop Response.Write("</table>") Response.Write("</div>") Response.Write("</td>") Response.Write("<td>") Response.Write("<div id=dReport5 style=""position:relative;overflow-x:scroll;overflow-y:hidden;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("<table border=0 width=260 cellpadding=0 cellspacing=0>") Response.Write("<col width=260>") HoldColor = "#E0FFFF" rst.MoveFirst Do While Not rst.EOF if HoldColor = "#FFFFCC" Then HoldColor = "#E0FFFF" Else HoldColor = "#FFFFCC" End if If (rst("NCO") <> 0 And not isnull(rst("NCO"))) Then If not isnull(rst("NCH")) Then ABACal = ((rst("NCO") - rst("NCH"))/rst("NCO")) * 100 Else ABACal = 0 End if Else ABACal = 0 End if If CDbl(ABACal) >= CDbl(sABA) Then Response.Write("<tr bgcolor="&HoldColor&">") Response.Write("<td valign=Bottom ><font face='arial' size=1 color='black'><b> " & rst("DNIS_DESC") & " </b></font></td>") Response.Write("</tr>") End if rst.MoveNext Loop Response.Write("</table>") Response.Write("</div>") Response.Write("</td>") Response.Write("<td>") Response.Write("<div id=dReport6 style=""position:relative;overflow-x:scroll;overflow-y:scroll;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"" onscroll=""keepTogether();"">") Response.Write("<table border=0 width=225 cellpadding=0 cellspacing=0>") Response.Write("<col width=45><col width=45><col width=55><col width=40><col width=40>") HoldColor = "#E0FFFF" rst.MoveFirst Do While Not rst.EOF if HoldColor = "#FFFFCC" Then HoldColor = "#E0FFFF" Else HoldColor = "#FFFFCC" End if If (rst("NCO") <> 0 And not isnull(rst("NCO"))) Then If not isnull(rst("NCH")) Then ABACal = ((rst("NCO") - rst("NCH"))/rst("NCO")) * 100 Else ABACal = 0 End if Else ABACal = 0 End if If CDbl(ABACal) >= CDbl(sABA) Then If (rst("NCH") <> 0 And not isnull(rst("NCH"))) Then if not isnull(rst("DTH")) then ASACal = (rst("DTH")/rst("NCH")) Else ASACal = 0 End if Else ASACal = 0 End if Response.Write("<tr bgcolor="&HoldColor&">") Response.Write("<td valign=Bottom align=right><font face='arial' size=1 color='black'><b> " & rst("NCO") & "</b></font></td>") Response.Write("<td valign=Bottom align=right><font face='arial' size=1 color='black'><b>" & rst("NCH") & "</b></font></td>") Response.Write("<td valign=Bottom align=right><font face='arial' size=1 color='black'><b>" & FormatNumber(ABACal,1) & " %</b></font></td>") Response.Write("<td valign=Bottom align=right><font face='arial' size=1 color='black'><b>" & Round(ASACal) & "</b></font></td>") Response.Write("<td valign=Bottom align=Center><font face='arial' size=1 color='black'><b>" & rst("DNIS_PRIORITY") & "</b></font></td>") Response.Write("</tr>") End if rst.MoveNext Loop Response.Write("</table>") Response.Write("</div>") Response.Write("</td>") Else 'Summary Report Response.Write("<td>") Response.Write("<div id=dReport1 style=""position:relative;overflow-x:scroll;overflow-y:hidden;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("<table border=0 width=140 cellpadding=0 cellspacing=0>") Response.Write("<col width=40><col width=100>") HoldColor = "#E0FFFF" Do While Not rst.EOF if HoldColor = "#FFFFCC" Then HoldColor = "#E0FFFF" Else HoldColor = "#FFFFCC" End if If (rst("SUMNCO") <> 0 And not isnull(rst("SUMNCO"))) Then If not isnull(rst("SUMNCH")) Then ABACal = ((rst("SUMNCO") - rst("SUMNCH"))/rst("SUMNCO")) * 100 Else ABACal = 0 End if Else ABACal = 0 End if If CDbl(ABACal) >= CDbl(sABA) Then Response.Write("<tr bgcolor="&HoldColor&">") Response.Write("<td valign=Bottom ><font face='arial' size=1 color='black'><b>" & rst("CENTER_ID") & "</b></font></td>") Response.Write("<td valign=Bottom align=right><font face='arial' size=1 color='black'><b>" & rst("BU_NAME") & " </b></font></td>") Response.Write("</tr>") End if rst.MoveNext Loop Response.Write("</table>") Response.Write("</div>") Response.Write("</td>") Response.Write("<td>") Response.Write("<div id=dReport2 style=""position:relative;overflow-x:scroll;overflow-y:hidden;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("<table border=0 width=180 cellpadding=0 cellspacing=0>") Response.Write("<col width=180>") HoldColor = "#E0FFFF" rst.MoveFirst Do While Not rst.EOF if HoldColor = "#FFFFCC" Then HoldColor = "#E0FFFF" Else HoldColor = "#FFFFCC" End if If (rst("SUMNCO") <> 0 And not isnull(rst("SUMNCO"))) Then If not isnull(rst("SUMNCH")) Then ABACal = ((rst("SUMNCO") - rst("SUMNCH"))/rst("SUMNCO")) * 100 Else ABACal = 0 End if Else ABACal = 0 End if If CDbl(ABACal) >= CDbl(sABA) Then Response.Write("<tr bgcolor="&HoldColor&">") Response.Write("<td valign=Bottom ><font face='arial' size=1 color='black'><b> " & rst("SUB_BU_NAME") & " </b></font></td>") Response.Write("</tr>") End if rst.MoveNext Loop Response.Write("</table>") Response.Write("</div>") Response.Write("</td>") Response.Write("<td>") Response.Write("<div id=dReport3 style=""position:relative;overflow-x:scroll;overflow-y:hidden;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("<table border=0 width=150 cellpadding=0 cellspacing=0>") Response.Write("<col width=40><col width=110>") HoldColor = "#E0FFFF" rst.MoveFirst Do While Not rst.EOF if HoldColor = "#FFFFCC" Then HoldColor = "#E0FFFF" Else HoldColor = "#FFFFCC" End if If (rst("SUMNCO") <> 0 And not isnull(rst("SUMNCO"))) Then If not isnull(rst("SUMNCH")) Then ABACal = ((rst("SUMNCO") - rst("SUMNCH"))/rst("SUMNCO")) * 100 Else ABACal = 0 End if Else ABACal = 0 End if If CDbl(ABACal) >= CDbl(sABA) Then Response.Write("<tr bgcolor="&HoldColor&">") Response.Write("<td valign=Bottom ><font face='arial' size=1 color='black'><b> " & rst("DNIS") & "</b></font></td>") Response.Write("<td valign=Bottom ><font face='arial' size=1 color='black'><b>" & rst("SEG_NAME") & " </b></font></td>") Response.Write("</tr>") End if rst.MoveNext Loop Response.Write("</table>") Response.Write("</div>") Response.Write("</td>") Response.Write("<td>") Response.Write("<div id=dReport4 style=""position:relative;overflow-x:scroll;overflow-y:hidden;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("<table border=0 width=180 cellpadding=0 cellspacing=0>") Response.Write("<col width=180>") HoldColor = "#E0FFFF" rst.MoveFirst Do While Not rst.EOF if HoldColor = "#FFFFCC" Then HoldColor = "#E0FFFF" Else HoldColor = "#FFFFCC" End if If (rst("SUMNCO") <> 0 And not isnull(rst("SUMNCO"))) Then If not isnull(rst("SUMNCH")) Then ABACal = ((rst("SUMNCO") - rst("SUMNCH"))/rst("SUMNCO")) * 100 Else ABACal = 0 End if Else ABACal = 0 End if If CDbl(ABACal) >= CDbl(sABA) Then Response.Write("<tr bgcolor="&HoldColor&">") Response.Write("<td valign=Bottom ><font face='arial' size=1 color='black'><b> " & rst("SUB_SEG_NAME") & " </b></font></td>") Response.Write("</tr>") End if rst.MoveNext Loop Response.Write("</table>") Response.Write("</div>") Response.Write("</td>") Response.Write("<td>") Response.Write("<div id=dReport5 style=""position:relative;overflow-x:scroll;overflow-y:hidden;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"">") Response.Write("<table border=0 width=260 cellpadding=0 cellspacing=0>") Response.Write("<col width=260>") HoldColor = "#E0FFFF" rst.MoveFirst Do While Not rst.EOF if HoldColor = "#FFFFCC" Then HoldColor = "#E0FFFF" Else HoldColor = "#FFFFCC" End if If (rst("SUMNCO") <> 0 And not isnull(rst("SUMNCO"))) Then If not isnull(rst("SUMNCH")) Then ABACal = ((rst("SUMNCO") - rst("SUMNCH"))/rst("SUMNCO")) * 100 Else ABACal = 0 End if Else ABACal = 0 End if If CDbl(ABACal) >= CDbl(sABA) Then Response.Write("<tr bgcolor="&HoldColor&">") Response.Write("<td valign=Bottom ><font face='arial' size=1 color='black'><b> " & rst("DNIS_DESC") & " </b></font></td>") Response.Write("</tr>") End if rst.MoveNext Loop Response.Write("</table>") Response.Write("</div>") Response.Write("</td>") Response.Write("<td>") Response.Write("<div id=dReport6 style=""position:relative;overflow-x:scroll;overflow-y:scroll;border-left:1px solid gray;border-top:1px solid black;border-right:1px solid gray;"" onscroll=""keepTogether();"">") Response.Write("<table border=0 width=225 cellpadding=0 cellspacing=0>") Response.Write("<col width=45><col width=45><col width=55><col width=40><col width=40>") HoldColor = "#E0FFFF" rst.MoveFirst Do While Not rst.EOF if HoldColor = "#FFFFCC" Then HoldColor = "#E0FFFF" Else HoldColor = "#FFFFCC" End if If (rst("SUMNCO") <> 0 And not isnull(rst("SUMNCO"))) Then If not isnull(rst("SUMNCH")) Then ABACal = ((rst("SUMNCO") - rst("SUMNCH"))/rst("SUMNCO")) * 100 Else ABACal = 0 End if Else ABACal = 0 End if If CDbl(ABACal) >= CDbl(sABA) Then If (rst("SUMNCH") <> 0 And not isnull(rst("SUMNCH"))) Then if not isnull(rst("SUMDTH")) then ASACal = (rst("SUMDTH")/rst("SUMNCH")) Else ASACal = 0 End if Else ASACal = 0 End if Response.Write("<tr bgcolor="&HoldColor&">") Response.Write("<td valign=Bottom align=right><font face='arial' size=1 color='black'><b> " & rst("SUMNCO") & "</b></font></td>") Response.Write("<td valign=Bottom align=right><font face='arial' size=1 color='black'><b>" & rst("SUMNCH") & "</b></font></td>") Response.Write("<td valign=Bottom align=right><font face='arial' size=1 color='black'><b>" & FormatNumber(ABACal,1) & " %</b></font></td>") Response.Write("<td valign=Bottom align=right><font face='arial' size=1 color='black'><b>" & Round(ASACal) & "</b></font></td>") Response.Write("<td valign=Bottom align=Center><font face='arial' size=1 color='black'><b>" & rst("DNIS_PRIORITY") & "</b></font></td>") Response.Write("</tr>") End if rst.MoveNext Loop Response.Write("</table>") Response.Write("</div>") Response.Write("</td>") End if End if Response.Write("</TR>") Response.Write("</Table>") Response.Write("<br>") rst.Close Conn.Close Set rst = Nothing Set Conn = Nothing |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > filtering and sorting a recordset |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|