NumberFormat code no longer works in OWC 11 on Windows Server 2003

J

John Doe

Hello,

We have some OWC code running on a classic ASP page using OWC charts. The
code has run fine in Production under Windows Server 2000 and OWC 10. The
server is being replaced by Windows Server 2003. We now are using OWC 11. We
updated the code to use the OWC11 namespace. We now encounter an error using
the NumberFormat Property. We are trying to display numeric percentages along
the y axis. This code runs fine on OWC 10. The last line of code(assigning
the NumberFormat) gives the following error message:

Microsoft Office 2003 Web Components error '80004005'

Invalid Parameter



' Create a Chart Object
Set oChart = CreateObject("OWC11.ChartSpace")
Set c = oChart.Constants

' Add a chart
Set cht = oChart.Charts.Add()

'set type of chart
cht.Type = c.chChartTypeColumnClustered

' Set the different parameters for the ChartSpace
oChart.Border.Color = c.chColorNone

' Get Organization number and use it to set the Caption
'nOrg = nData/5
sCaption = strChart

'oChart.Charts(0).Type = oChart.Constants.chChartTypeSmoothLineMarkers
'add first series
oChart.Charts(0).SeriesCollection.Add
oChart.Charts(0).SeriesCollection(0).Caption = sCaption
'add second series
oChart.Charts(0).SeriesCollection.Add
oChart.Charts(0).SeriesCollection(1).Caption = sCaption2

'set categories for each series (same in this case)
oChart.Charts(0).SeriesCollection(0).SetData c.chDimCategories,
c.chDataLiteral, Categories

'set values for first series
oChart.Charts(0).SeriesCollection(0).SetData c.chDimValues,
c.chDataLiteral, Vals

'oChart.Charts(0).SeriesCollection(0).Scalings(c.chDimValues).Maximum = 3
oChart.Charts(0).SeriesCollection(0).Scalings(c.chDimValues).Minimum = 0

Dim axs
Set axs = oChart.Charts(0).Axes(1)
axs.Font.Name = "arial"

'this would appear under the chart
'axs.HasTitle = True
'axs.Title.Caption = "Locations"

dim yxs
Set yxs = oChart.Charts(0).Axes(0)
axs.Font.Name = "arial"

yxs.HasTitle = True
yxs.Title.Caption = strChart


yxs.NumberFormat = "###%"

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top