H
Hui
I need to create a pivot chart linked to data in a SQL
Server table. But I am having trouble adding multiple data
series into the chart. Please help:
c = chartspace1.constants
chartspace1.ConnectionString
= "Provider=SQLOLEDB.1;Integrated Security=SSPI;Initial
Catalog=TT;Data Source=sql1;"
chartspace1.DataMember = "dbo.Gantt_Test"
chartspace1.Charts(0).type = c.chChartTypeBarStacked
//This works, add two categories
chartspace1.setdata c.chDimCategories,0, array
(chartspace1.internalpivottable.activeview.fieldsets
("Name").fields("Name"),
chartspace1.internalpivottable.activeview.fieldsets
("Completed").fields("Completed"))
//But this does not work, Invalid procedure call or
argument
chartspace1.setdata c.chDimValues,0, array
(chartspace1.internalpivottable.activeview.fieldsets
("Totals").fields("start qty"),
chartspace1.internalpivottable.activeview.fieldsets
("Totals").fields("end qty"))
//This works, add one data fields
chartspace1.setdata c.chDimValues,0,"start qty"
Server table. But I am having trouble adding multiple data
series into the chart. Please help:
c = chartspace1.constants
chartspace1.ConnectionString
= "Provider=SQLOLEDB.1;Integrated Security=SSPI;Initial
Catalog=TT;Data Source=sql1;"
chartspace1.DataMember = "dbo.Gantt_Test"
chartspace1.Charts(0).type = c.chChartTypeBarStacked
//This works, add two categories
chartspace1.setdata c.chDimCategories,0, array
(chartspace1.internalpivottable.activeview.fieldsets
("Name").fields("Name"),
chartspace1.internalpivottable.activeview.fieldsets
("Completed").fields("Completed"))
//But this does not work, Invalid procedure call or
argument
chartspace1.setdata c.chDimValues,0, array
(chartspace1.internalpivottable.activeview.fieldsets
("Totals").fields("start qty"),
chartspace1.internalpivottable.activeview.fieldsets
("Totals").fields("end qty"))
//This works, add one data fields
chartspace1.setdata c.chDimValues,0,"start qty"