Foxchart: Handling filters

Topics: General
Jun 7, 2011 at 10:19 AM

Not sure if this is a bug or by design.

My chart cursor contains the same data in various levels of details. To select the desired information depth I'm using a filter. Works fine for my alternatives drill down data views, but fails on a chart, because _PrepareData uses a SELECT statement to turn the SourceAlias cursor into the FCharts_Temp cursor. I changed the SELECT command as follows to respect filters:


* Maintain filters
Local lcWhere
lcWhere = Filter(.SourceAlias)
If not Empty(m.lcWhere)
  lcWhere = "WHERE " + m.lcWhere

SELECT * FROM (.SourceAlias) &lcWhere INTO CURSOR FCharts_TempData READWRITE

Obviously, this solution won't work for every kind of filter expression.

Christof Wollenhaupt