Ver Mensaje Individual
  #17 (permalink)  
Antiguo 12/08/2006, 08:09
jquevedo
 
Fecha de Ingreso: julio-2006
Ubicación: Viru - Trujillo - Peru
Mensajes: 11
Antigüedad: 18 años, 9 meses
Puntos: 0
hola potro

buenos dias primero agradecer a Ana Luisa por el enlace, y me esta funcionando muy bien yo hice un pequeño programa con base de datos en sql si deseas el ejemplo te dejo mi direccion electronica ahi te la pego a ver si te sirve.

<%@ language="vbscript" %>
<%select case session("campanaresumida")
case "3"
set cnalcachofa=server.CreateObject("adodb.connection" )
cnalcachofa.Open "PROVIDER=MSDASQL;dsn=ALCACHOFA2005;uid=;pwd=; "
set rsresumen=server.CreateObject("adodb.recordset")
strresumen="select * from vista_salida_resumen where cont_id='" & session("productorresumida") & "' order by arti_descrip"
rsresumen.Open strresumen,cnalcachofa
'DATOS DEL PRODUCTOR
set rsproductor=server.CreateObject("adodb.recordset")
strproductor="select * from vista_productor where cont_id='" & session("productorresumida") & "'"
rsproductor.Open strproductor,cnalcachofa
productor = trim(rsproductor("pers_apat")) & " " & trim(rsproductor("pers_amat")) & " " & trim(rsproductor("pers_nom"))
rsproductor.close
set rsproductor=nothing
mensaje= "Insumos del Productor: " & productor
case "8"
set cnalcachofa=server.CreateObject("adodb.connection" )
cnalcachofa.Open "PROVIDER=MSDASQL;dsn=ALCACHOFA2006;uid=;pwd=; "
set rsresumen=server.CreateObject("adodb.recordset")
strresumen="select * from vista_salida_resumen where cont_id='" & session("productorresumida") & "' order by arti_descrip"
rsresumen.Open strresumen,cnalcachofa
'DATOS DEL PRODUCTOR
set rsproductor=server.CreateObject("adodb.recordset")
strproductor="select * from vista_productor where cont_id='" & session("productorresumida") & "'"
rsproductor.Open strproductor,cnalcachofa
productor = trim(rsproductor("pers_apat")) & " " & trim(rsproductor("pers_amat")) & " " & trim(rsproductor("pers_nom"))
rsproductor.close
set rsproductor=nothing
mensaje= "Cantidad Insumos del Productor: " & productor
i=0
do while not rsresumen.eof
i=i+1
rsresumen.movenext
loop
rsresumen.movefirst
dim label ()
redim label (i)
dim data ()
redim data(i)
j=0
do while not rsresumen.eof
label(j)=rsresumen("arti_descrip")
data(j)=rsresumen("cantidad")
j=j+1
rsresumen.movenext
loop
rsresumen.close
set rsresumen=nothing
end select
'COMIENZA LA CONSTRUCCION DE LA DATA
Set cd = CreateObject("ChartDirector.API")

' The colors for the bar chart
colors = Array(&Hb8bc9c, &Ha0bdc4, &H999966, &H333366, &Hc3c3e6)

' Create a XYChart object of size 300 x 220 pixels. Use golden background color. Use
' a 2 pixel 3D border.
Set c = cd.XYChart(850, 550, cd.goldColor(), -1, 2)

' Add a title box using 10 point Arial Bold font. Set the background color to
' metallic blue (9999FF) Use a 1 pixel 3D border.
Call c.addTitle(mensaje, "arialbd.ttf", 10).setBackground( _
cd.metalColor(&H9999ff), -1, 1)

' Set the plotarea at (40, 40) and of 240 x 150 pixels in size
Call c.setPlotArea(40, 40, 800, 450)

' Add a multi-color bar chart layer using the given data and colors. Use a 1 pixel 3D
' border for the bars.
Call c.addBarLayer3(data, colors).setBorderColor(-1, 1)

' Set the labels on the x axis.
'Call c.xAxis().setLabels(label)

' output the chart
Response.ContentType = "image/png"
Response.BinaryWrite c.makeChart2(cd.PNG)
Response.End
%>


ojala te sirva.

att.

Jusein Quevedo Cabrera
Agrodoral S.A.