When switching datasets ...
Posted: Sun Jan 08, 2006 8:19 pm
Hi,
Frequently my charts draw from clientdatasets whose contents I switch around for other datasets with different fieldDefs. I've learned to clear the data related chart properties to avoid error messages like:
'Project Alpha.exe raised exception class EdatabaseError with message'cds: Field 'fld1' not found'.
I've been clearing the chart properties with this:
form1.DBChart1.Series.DataSource := nil;
form1.DBChart1.Series.YValues.ValueSource := '';
form1.DBChart1.Series.XLabelsSource := '';
form1.DBChart1.Series.XValues.ValueSource := '';
Is there a simpler or better method for doing this?
Thanks,
Barry
Frequently my charts draw from clientdatasets whose contents I switch around for other datasets with different fieldDefs. I've learned to clear the data related chart properties to avoid error messages like:
'Project Alpha.exe raised exception class EdatabaseError with message'cds: Field 'fld1' not found'.
I've been clearing the chart properties with this:
form1.DBChart1.Series.DataSource := nil;
form1.DBChart1.Series.YValues.ValueSource := '';
form1.DBChart1.Series.XLabelsSource := '';
form1.DBChart1.Series.XValues.ValueSource := '';
Is there a simpler or better method for doing this?
Thanks,
Barry