A copy from the Zeos Forums (http://zeoslib.sourceforge.net/viewtopic.php?f=40&t=76424):
Hi,
In https://svn.code.sf.net/p/zeoslib/code-0/trunk/src/component/ZAbstractRODataset.pas (rev. 4080) there is a bug that prevents filtering of e.g. rxdbgrid on computed columns. For my attemted fix, see below. I dunno if this has been fixed in trunk. BTW: I totally did not understand the magic casting of RowBuffer for GetCalcFields. Seems smelly....
function TZAbstractRODataset.GetActiveBuffer(var RowBuffer: PZRowBuffer): Boolean; //... if (ResultSet.GetRow = RowNo) or ResultSet.MoveAbsolute(RowNo) then begin if (State = dsOldValue) and (ResultSet. QueryInterface(IZCachedResultSet, CachedResultSet) = 0) then CachedResultSet.MoveToInitialRow; FetchFromResultSet(ResultSet, FieldsLookupTable, Fields, RowAccessor); RowBuffer.Index := RowNo; // >>>>>>> attempted fix {$IFDEF WITH_TRECORDBUFFER} GetCalcFields({$IFDEF WITH_GETCALCFIELDS_TRECBUF}NativeInt{$ELSE}TRecordBuffer{$ENDIF}(RowBuffer)); {$ELSE} GetCalcFields(PChar(RowBuffer)); {$ENDIF} // <<<<<<<<<<<<<<<< attemted fix ResultSet.MoveToCurrentRow; end //...
Thanks,
Willibald
I will put my plans on a new Zeos 7.2 realease on hold until I know more about this.
applied! thanks