Icon View Incident Report

Minor Minor
Reported By: Roy Lambert
Reported On: 9/10/2005
For: Version 4.21 Build 10
# 2110 Using Boolean Custom Functions in Filters Causes Incorrect Record Counts

Continuing the playing I created a custom function (below). When applied the RecordCount & FilteredRecordCount both showed 317. The correct answer was 24.

begin
 with Engine do begin
  with Functions.CreateFunction(ftBoolean, 'HasEmployees').Params do begin
   CreateFunctionParam(ftString); // field
   CreateFunctionParam(ftString); // test
   CreateFunctionParam(ftString); //phone no
  end;
  OnCustomFunction := CustomFunction;
 end;
 companies.Open;
 companies.filter :=  'HasEmployees(_Company,''= False'','''') ';
 companies.filtered:=true;
end;



Comments Comments and Workarounds
The workaround is to use the following expression instead:

companies.filter := 'HasEmployees(_Company,''= False'','''')=True';

The problem was that DBISAM was not properly handling custom functions that returned Boolean values.


Resolution Resolution
Fixed Problem on 9/14/2005 in version 4.21 build 11


Products Affected Products Affected
DBISAM CLX Client-Server
DBISAM CLX Client-Server with Source
DBISAM CLX Standard
DBISAM CLX Standard with Source
DBISAM VCL Client-Server
DBISAM VCL Client-Server with Source
DBISAM VCL Standard
DBISAM VCL Standard with Source

Image