M
Michael Weiss
Hello,
I have a chartspace in which I am trying to present
multiple charts. The chartspace data feed is a OWC pivot
control pulling data from an Analysis Services 2000 data
cube. In the following code, I am getting an error on the
line ".SetData c.chDimSeriesNames, 0, c.chPivotColumns".
The error message simply says 'Unspecified Error'. The
code executes on the client side. Any help or suggestions
would be greatly appreciated.
Thank you,
Michael
Here is the relevant portion of the code:
' Get the active view
set pview = ptable.ActiveView
set pc = ptable.Constants
' Bind the Chart control to the PivotTable control
cspace.clear
set cspace.DataSource = ptable
set c = cspace.Constants
'cspace.PlotAllAggregates = c.chPlotAggregatesCategories
'cspace.PlotAllAggregates = c.chPlotAggregatesSeries
with cspace
..ChartLayout = c.chChartLayoutHorizontal
..displayfieldbuttons = false
..interior.color = "white"
..HasChartSpaceTitle = true
..ChartSpaceTitle.Caption = "Call Type Analysis"
..ChartSpaceTitle.font.color = "#336699"
..ChartSpaceTitle.font.size = 9
..ChartSpaceTitle.Font.Bold = true
'.Border.Color = c.chColorNone
end with
Set cht = cspace.charts(0)
with cht
..haslegend = true
..HasTitle = True
..Title.Caption = "Minutes"
' bind the series and categories dimensions
..SetData c.chDimSeriesNames, 0, c.chPivotColumns 'error
on this line
..SetData c.chDimCategories, 0, c.chPivotRows
' Use the totals for values
..SetData c.chDimValues, 0, 0
..Type = c.chChartTypePieExploded3d
set ax = .Axes(c.chAxisPositionBottom)
set ttl = pview.DataAxis.Totals(0)
ax.NumberFormat = ttl.NumberFormat
ax.HasTitle = True
ax.Title.Caption = ttl.Caption
ax.title.font.size = 8
ax.title.font.color = "#336699"
set ax = cht.Axes(c.chAxisPositionLeft)
ax.Scaling.Orientation = c.chScaleOrientationMaxMin
..plotarea.interior.color = "white"
..axes(1).font.color = "#336699"
..axes(0).font.color = "#336699"
..axes(1).font.size = 7
..axes(0).font.size = 7
..legend.interior.color = "white"
..legend.font.size = 7
..legend.font.color = "#336699"
end with
I have a chartspace in which I am trying to present
multiple charts. The chartspace data feed is a OWC pivot
control pulling data from an Analysis Services 2000 data
cube. In the following code, I am getting an error on the
line ".SetData c.chDimSeriesNames, 0, c.chPivotColumns".
The error message simply says 'Unspecified Error'. The
code executes on the client side. Any help or suggestions
would be greatly appreciated.
Thank you,
Michael
Here is the relevant portion of the code:
' Get the active view
set pview = ptable.ActiveView
set pc = ptable.Constants
' Bind the Chart control to the PivotTable control
cspace.clear
set cspace.DataSource = ptable
set c = cspace.Constants
'cspace.PlotAllAggregates = c.chPlotAggregatesCategories
'cspace.PlotAllAggregates = c.chPlotAggregatesSeries
with cspace
..ChartLayout = c.chChartLayoutHorizontal
..displayfieldbuttons = false
..interior.color = "white"
..HasChartSpaceTitle = true
..ChartSpaceTitle.Caption = "Call Type Analysis"
..ChartSpaceTitle.font.color = "#336699"
..ChartSpaceTitle.font.size = 9
..ChartSpaceTitle.Font.Bold = true
'.Border.Color = c.chColorNone
end with
Set cht = cspace.charts(0)
with cht
..haslegend = true
..HasTitle = True
..Title.Caption = "Minutes"
' bind the series and categories dimensions
..SetData c.chDimSeriesNames, 0, c.chPivotColumns 'error
on this line
..SetData c.chDimCategories, 0, c.chPivotRows
' Use the totals for values
..SetData c.chDimValues, 0, 0
..Type = c.chChartTypePieExploded3d
set ax = .Axes(c.chAxisPositionBottom)
set ttl = pview.DataAxis.Totals(0)
ax.NumberFormat = ttl.NumberFormat
ax.HasTitle = True
ax.Title.Caption = ttl.Caption
ax.title.font.size = 8
ax.title.font.color = "#336699"
set ax = cht.Axes(c.chAxisPositionLeft)
ax.Scaling.Orientation = c.chScaleOrientationMaxMin
..plotarea.interior.color = "white"
..axes(1).font.color = "#336699"
..axes(0).font.color = "#336699"
..axes(1).font.size = 7
..axes(0).font.size = 7
..legend.interior.color = "white"
..legend.font.size = 7
..legend.font.color = "#336699"
end with