>Hi Erik,
>
>You answered our plea for help on UT. Sorry to be so long getting back to you, work has been quite hectic lately. Now heres the problem: We were hoping to use the MSChart control to display some stats in one of our applications. After reading the scanty help files and trying what they said, we haven't been able to get it to work. It seems that we need to take the data from our query and place it in a 2d array, then specify the array as the data source for the chart. We've tried that and all we seem to get are OLE automation errors.
>
I believe you are getting errors here because the chart's ChartData property accepts a COM SafeArray, which VFP arrays are not. You might have better luck looping through your array and setting the values manually:
WITH THISFORM.MSChart
.ColumnCount = ALEN(MyArray, 2)
.RowCount = ALEN(MyArray, 1)
For nColumn = 1 To .RowCount
For nRow = 1 To .ColumnCount
.Column = nColumn
.Row = nRow
.Data = MyArray[nRow, nColumn]
ENDFOR
ENDFOR
ENDWITH
Erik Moore
Clientelligence