Hi,
How do you display the next record in a table when using the "Single Record" mode for a series? The chart seems to display the current record, but how do I navigate the table and get the chart to display different records?
Thanks.
Single Record
Hi Kai,
Indeed, a TDBChart is not refreshed if record position changes. I've tried this with TeeChart v7 (the "DBChart_SingleRecord.pas" example) and the chart was not refreshed as I moved from one record to another. The workaround in this case (and I guess in similar cases) is to use dataset events together with TDBChart.RefreshData method to refresh chart when appropriate. In DBChart_SingleRecord.pas case, adding RefreshData call to TTable.OnAfterScroll event should do the trick:
The same approach can be used for TTable.OnAfterPost, OnAfterOpen, ... events.
Indeed, a TDBChart is not refreshed if record position changes. I've tried this with TeeChart v7 (the "DBChart_SingleRecord.pas" example) and the chart was not refreshed as I moved from one record to another. The workaround in this case (and I guess in similar cases) is to use dataset events together with TDBChart.RefreshData method to refresh chart when appropriate. In DBChart_SingleRecord.pas case, adding RefreshData call to TTable.OnAfterScroll event should do the trick:
Code: Select all
procedure TDBChartSingleRecord.Table1AfterScroll(DataSet: TDataSet);
begin
inherited;
DBChart1.RefreshData;
end;
Pep Jorge
http://support.steema.com
http://support.steema.com