hola, estava usando este codigo para hacer graficas y me funcionava solo borre win xp y lo instale de nuevo y no me funciona ke puedo hacer
Error Type:
Server object, ASP 0177 (0x800401F3)
Invalid class string
/amed/sfh/chart/chart_global.asp, line 32
anyone can help me pls
here is the code
<%
Option Explicit
Response.ContentType = "image/gif"
%>
<%
'declare our variables
Dim strSQL, rst, strConnectionString
Dim objConstants, objFont, objChart, objCSpace, objAxis
Dim objBinaryFile, FSO
'the connection string
strConnectionString = "provider=microsoft.jet.oledb.4.0;" _
& "data source=C:\product.mdb"
'create the recordset object
set rst = Server.CreateObject("ADODB.Recordset")
%>
<%
'the SQL query
strSQL = "select Accion, count(*) as num from table1 group by Accion "
'get the data with a client side cursor, and static dataset
rst.open strSQL, strConnectionString, 3, 3
'Now create the chart object
set objCSpace = Server.CreateObject("OWC.Chart")
%>
<%
'set up chart and properties
set objChart = objCSpace.Charts.Add()
set objConstants = objCSpace.Constants
'create a clustered column chart
objChart.Type = objConstants.chChartTypeColumnClustered
'add a legend
objChart.HasLegend = false
%>
<%
'set the data source to the recordset
set objCSpace.DataSource = rst
'set the data points and categories
objChart.SetData objConstants.chDimSeriesNames, 0, "num"
objChart.SetData objConstants.chDimCategories, 0, "Accion"
objChart.SetData objConstants.chDimValues, 0, "num"
'set up some additional properties
'add and format the chart title
objChart.HasTitle = True
objChart.Title.Caption = "Accciones Correctivas Global"
set objFont = objChart.Title.Font
objFont.Name = "Tahoma"
objFont.Size = 12
objFont.Bold = True
'add and format a title to the category axis
set objAxis = objChart.Axes(objConstants.chAxisPositionBottom)
objAxis.HasTitle = True
objAxis.Title.Caption = "Acciones"
set objFont = objAxis.Title.Font
objFont.Name = "Tahoma"
objFont.Size = 10
objFont.Bold = True
'add and format a title to the value axis
set objAxis = objChart.Axes(objConstants.chAxisPositionLeft)
'objAxis.NumberFormat = "Currency"
objAxis.HasTitle = True
objAxis.Title.Caption = "Numero de Acciones Correctivas"
set objFont = objAxis.Title.Font
objFont.Name = "Tahoma"
objFont.Size = 8
objFont.Bold = True
%>
<%
'Save the current chart to a GIF file with a temporary
'filename using the FSO
set fso = Server.CreateObject("Scripting.FileSystemObject")
Dim strFileName
strFileName = Server.MapPath(".") & "\" & fso.GetTempName()
objCSpace.ExportPicture strFileName, "gif", 700, 400
'Use On Error Resume Next to make sure we eventually delete
'the temporary GIF file even if something fails in the next
'couple of functions
on error resume next
'The GIF file has been created. Return the contents of the
'GIF file as binary data using the BinaryFileStream COM object
set objBinaryFile = Server.CreateObject("BinaryFileStream.Object")
Response.BinaryWrite objBinaryFile.GetFileBytes(CStr(strFileName))
'Delete the GIF file since it is no longer needed
objBinaryFile.DeleteFile CStr(sFullFileName)
'clear variables
set objBinaryFile = nothing
set FSO = nothing
set objCSpace = nothing
%><body bgcolor="#000000">