Chartspace.SetData

R

rweide

I am building charts with data coming from a pivot table.

After the regular "CLEAR", "CHARTS.ADD", "TYPE",
and "DATASOURCE" statements, I came to the "SETDATA"
statment. But I kept receiving 'subscript out of range'
error that seems to come from the 3rd parameter of this
SETDATA line with chDimSeriesNames or chDimCategories as
the 1st parameter, and the number 0 as the 2nd parameter.

My question: what exactly is expected for the 3rd
parameter? Should I use chDataBound for the data source
if I use a pivot table?

Thanks.
 
G

Guest

Thank you very much.
-----Original Message-----
The third parameter of the SetData() is the data itself. In the case of
databinding to a pivottable, it will be the field name.

For example

Webchart.ConnectionString = "Provider=SQLOLEDB.1;Persist Security
Info=true;User ID=tester1;Password=;Initial Catalog=northwind; Data
Source=My_DB"
webchart.commandtext = "select * from orders"

webchart.setdata 0,0,"CompanyName"
webchart.setdata 1,0,"Address"
webchart.setdata 2,0,"Country"

---------------------------------------
Thao Moua
OWC Chartspace Support

This posting is provided "AS IS" with no warranties, and
confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


.
 

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