Bug using ValueIndex in a DBChart
Posted: Fri Mar 04, 2005 12:54 pm
Hello
I want to have an array of integer which looks like this :
Tab[n] = IdRecord of the dataset's record of a ganttSerie
I use the Event 'OnAfterAdd' of the serie :
procedure TFrmBossOrderLines.SerDataAfterAdd(Sender: TChartSeries;
ValueIndex: Integer);
begin
if Length(Tab)<ValueIndex+1 then SetLength(Tab,1+ValueIndex);
Tab[ValueIndex]:= DataSetName.FieldbyName('ID').AsInteger;
end;
I don't know why but it starts of well when I open the Dataset, I get the values wanted for ValueIndex 0, 1, 2 and then the next valueindex swithces back to 0 although the cursor of the dataset is on the 4th record.
And after ValueIndex continues to have awkward values...
Isn't ValueIndex suppose to be a unique number refering each ganttbar I have in the chart's serie ????
Thanks for anybody that can help.
I want to have an array of integer which looks like this :
Tab[n] = IdRecord of the dataset's record of a ganttSerie
I use the Event 'OnAfterAdd' of the serie :
procedure TFrmBossOrderLines.SerDataAfterAdd(Sender: TChartSeries;
ValueIndex: Integer);
begin
if Length(Tab)<ValueIndex+1 then SetLength(Tab,1+ValueIndex);
Tab[ValueIndex]:= DataSetName.FieldbyName('ID').AsInteger;
end;
I don't know why but it starts of well when I open the Dataset, I get the values wanted for ValueIndex 0, 1, 2 and then the next valueindex swithces back to 0 although the cursor of the dataset is on the 4th record.
And after ValueIndex continues to have awkward values...
Isn't ValueIndex suppose to be a unique number refering each ganttbar I have in the chart's serie ????
Thanks for anybody that can help.