
04/07/2002, 09:59
|
| | Fecha de Ingreso: junio-2002
Mensajes: 37
Antigüedad: 22 años, 10 meses Puntos: 0 | |
Graficas dinamicas este es mi codigo, ver mi codig Hola, necesito hacer graficas de acuerdo a un campo Meaning de una tabla llamada P1_ORDENES_COMPLETADAS, ese mercado lo voy a contar. Con ese campo, y la cantidad voy a llenar otra tabla llamada Status, la cual contiene los campos de Meaning y Quantity, los cuales serviran para realizar mi grafica.
Aqui hay un detalle, el usuario introduce dos rangos de fechas, los cuales serviaran para visualizar el estado del mercado, pero de esos rangos de fechas, mi codigo es el siguiente, gracias por leer.
<%
fechaini= Cdate(Request("fechaini"))
fechafin= Cdate(Request("fechafin"))
fechaini = Day(fechaini) & "-" & Month(fechaini) & "-" & Year(fechaini)
fechafin = Day(fechafin) & "-" & Month(fechafin) & "-" & Year(fechafin)
%>
<HTML>
<HEAD>
<style>
.vic {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
font-style: normal;
color: #003366;
}
</style>
<TITLE>Query1.asp</TITLE>
</HEAD>
<%
set rs = Server.CreateObject("ADODB.Recordset")
' Llenamos la tabla Status '
'---------------------------'
SQL="Delete * from Status insert into Status(MEANING, QUANTITY) Select MEANING, count(*) From P1_ORDENES_COMPLETADAS where DATE_COMPLETED between '"& fechaini &"' and '"& fechafin &"' group by MEANING"
rs.open SQL, conn
if not rs.eof then
MEANING = rs("MEANING")
end if
%>
<%
Randomize
Valor1=Int(MEANING * 100) +1
Valor2=Int(QUANTITY * 100) +1
%>
<FONT FACE=Arial SIZE=2 COLOR=#000000><B>Resultados</B></FONT><BR>
<TABLE BGCOLOR=#000000 WIDTH=760px BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT=4px>
<TR>
<TD ALIGN=RIGHT WIDTH=100px><FONT FACE=Arial SIZE=2 COLOR=#FFFFFF><B>Mercado</B></FONT></TD>
<TD WIDTH=2px></TD>
<TD ALIGN=LEFT WIDHT=200px><IMG SRC=../cuadro_azul.gif WIDTH=<% =valor1 %>px HEIGHT=4px><img src=../cuadro_rojo.gif width=<%=100 - Valor1 %>px height=4px</TD>
<TD ALIGN=LEFT WIDHT=200px><FONT FACE=Arial SIZE=2 COLOR=#FFFFFF><B><%valor1%>%</B></FONT></TD>
<TD WIDTH=2px></TD>
<TD WIDTH=520 |