Filtered ADO Recordset as Datasource

TeeChart for ActiveX, COM and ASP
Post Reply
mikall
Newbie
Newbie
Posts: 8
Joined: Mon Dec 20, 2004 5:00 am
Location: Tallahasse, Florida USA

Filtered ADO Recordset as Datasource

Post by mikall » Sun Jan 02, 2005 1:36 pm

Hello,

I have been working on a new project where I utilize ADO recordsets assembled in code as the datasource to a TeeChart. I had wanted to be able to filter the recordset, refesh the chart datasource and change the data displayed but TeeChart seems to ignore any filter on the recordset and only displays the full recordset regardless of any filters applied. Is this the expected behavior of TeeCharts, to ignore any filtering applyed to a recordset datasource?

Regards,

Michael Rekoff
Tallahassee, Florida USA

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Jan 03, 2005 7:54 am

Hi Michael,

have you seen the example included in the TeeChart Pro installation under :
C:\Program Files\Steema Software\TeeChart Pro v7 ActiveX Control\Examples\Visual Basic\Visual Basic 5 & 6\Database BLOBs
?

mikall
Newbie
Newbie
Posts: 8
Joined: Mon Dec 20, 2004 5:00 am
Location: Tallahasse, Florida USA

Post by mikall » Tue Jan 04, 2005 8:49 am

I hadn't seen that example before but it's not really what I'm trying to do. Basically I have a long series of data and I want to user to have the ability to select subsets of it and have the selected subset displayed in a TeeChart graph. For various reasons it's more convenent to load all the data , once, into a single ADO recordset and then select a subsets of the data using ADO's filtering and sorting functionality. I had just kind of expected TeeChart's "Datasource" property to behave similar to a Data Grid Control where the filtering and sorting of a recordset can be carried though to the control's display.

Since that's not the case, I will save the filtered recordset to an ADO stream object in memory and then recreate the recordset from this stream, as this operation will result in a separate recordset that only contains the elements of the applied filter.

TeeCharts seems to behave as if, internally, it creates a "Clone" recordset of the datasource.

Don't get me wrong, TeeCharts is great, I'm able to do things with it that other graph controls just can't do. However it would be nice if it supported more of ADO's functionality.

Regards,

Michael Rekoff
Tallahassee, Florida USA

Post Reply