HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #16  
Old November 2nd, 2000, 12:58 PM
Chad Chad is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 13 Chad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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).]

Reply With Quote
  #17  
Old November 6th, 2000, 11:51 AM
Chad Chad is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 13 Chad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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).]

Reply With Quote
  #18  
Old November 8th, 2000, 04:35 AM
mmonks mmonks is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 27 mmonks User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?


Reply With Quote
  #19  
Old November 8th, 2000, 08:19 AM
Chad Chad is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 13 Chad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #20  
Old November 9th, 2000, 04:47 AM
mmonks mmonks is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 27 mmonks User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.....

Reply With Quote
  #21  
Old November 9th, 2000, 07:56 AM
Chad Chad is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 13 Chad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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&nbsp;</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'>&nbsp;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'>&nbsp;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'>&nbsp;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'>&nbsp;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'>&nbsp;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") & "&nbsp;</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>&nbsp;" & rst("SUB_BU_NAME") & "&nbsp;</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>&nbsp;" & rst("DNIS") & "</b></font></td>")
Response.Write("<td valign=Bottom ><font face='arial' size=1 color='black'><b>" & rst("SEG_NAME") & "&nbsp;</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>&nbsp;" & rst("SUB_SEG_NAME") & "&nbsp;</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>&nbsp;" & rst("DNIS_DESC") & "&nbsp;</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>&nbsp;" & 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") & "&nbsp;</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>&nbsp;" & rst("SUB_BU_NAME") & "&nbsp;</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>&nbsp;" & rst("DNIS") & "</b></font></td>")
Response.Write("<td valign=Bottom ><font face='arial' size=1 color='black'><b>" & rst("SEG_NAME") & "&nbsp;</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>&nbsp;" & rst("SUB_SEG_NAME") & "&nbsp;</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>&nbsp;" & rst("DNIS_DESC") & "&nbsp;</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>&nbsp;" & 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

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > filtering and sorting a recordset


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |