Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OWC on IIS with ASP

Status
Not open for further replies.

Clarkie001

IS-IT--Management
Aug 26, 2003
59
0
0
GB
Hi,
I am using IIS on XP to create a corporate intranet site, before it is loaded onto the corporate servers.
I am having issues getting OWC to run... see below code. - I am getting "ASP 0177 Invalid Class String" error.

I do not have Office XP installed, I have only installed the seperate OWC web download.


Any help on this would be greatly appreciated

Thanks

Clarkie
<%
'set Chart Objects and properties

set objCSpace = Server.CreateObject("OWC.Chart")

set objChart = objCSpace.charts.add()
set objConstants = objCSpace.constants

objchart.type=objconstants.chChartTypeColumnClustered

objchart.HasLegend = true

set objCSpace.datasource = rs

objchart.setdata objconstants.chDimSeriesNames, 0, "Type"
objchart.setdata objconstants.chDimCategories, 0, "Year"
objchart.setdata objconstants.chDimValues, 0, "Value"

'Chart formats
objchart.hastitle = true
objchart.title.caption = "Income vs Expenditure"
set objfont = objchart.title.font
objfont.name = "Tahoma"
objfont.size = 10
objfont.bold = true

set objaxis = objchart.axes(objconstants.chAxisPositionBottom)
objaxis.hastitle = true
objaxis.title.caption = "Year"
set objfont = objaxis.title.font
objfont.name = "Tahoma"
objfont.size = 10
objfont.bold = true

set objaxis = cht.axes(objconstants.chAxisPositionLeft)
objaxis.numberformat = "Currency"
objaxis.hastitle = true
objaxis.title.caption = "£000s"
set objfont = objaxis.title.font
objfont.name = "Tahoma"
objfont.size = 10
objfont.bold = true

'Filesystemobject code - save the current chart to a gif with a temporary filename using FSO
set fso = server.createobject("Scripting.FileSystemObject")

strfilename = server.mappath("-") & "\" & fso.gettempname()
objCSpace.exportpicture strfilename, "gif", 800, 400

on error resume next

set objbinaryfile = server.createobject("BinaryFileStream.object")
response.binarywrite objbinaryfile.getfilebytes(cstr(strfilename))

objbinaryfile.deletefile cstr(sfullfilename)

'clear variables
set objbinaryfile = nothing
set fso = nothing
set objCSpace = nothing

%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top