Filter doesn't work in calculate field

Hi,
I created a calculate field in client side’s TDAMemDataTable. I use this calculate field for condition (Qty<>0) in “Filter” and enabled ‘Filtered = true’. But it doesn’t filter the dataset.

I tried to use the following in FillWithDASql that doesn’t filter the result. Is it a “Master/Detail” problem? Because TDAMemDataTable applied “Master/Detail” option.

AsmPvt := 'select * from SP_SPAsmPvt where PackOrder = ' + QuotedStr(tbl_master.FieldByName('PackOrder').AsString) +
' and (isnull(sizeqty1,0)+isnull(sizeqty2,0)+isnull(sizeqty3,0)+isnull(sizeqty4,0)+isnull(sizeqty5,0)+'+
'isnull(sizeqty6,0)+isnull(sizeqty7,0)+isnull(sizeqty8,0)+isnull(sizeqty9,0)+isnull(sizeqty10,0)+'+
'isnull(sizeqty11,0)+isnull(sizeqty12,0)+isnull(sizeqty13,0)+isnull(sizeqty14,0)+isnull(sizeqty15,0)+'+
'isnull(sizeqty16,0)+isnull(sizeqty17,0)+isnull(sizeqty18,0)+isnull(sizeqty19,0)+isnull(sizeqty20,0)+'+
'isnull(sizeqty21,0)+isnull(sizeqty22,0)+isnull(sizeqty23,0)+isnull(sizeqty24,0)+isnull(sizeqty25,0)+'+
'isnull(sizeqty26,0)+isnull(sizeqty27,0)+isnull(sizeqty28,0)+isnull(sizeqty29,0)+isnull(sizeqty30,0)+'+
'isnull(sizeqty31,0)+isnull(sizeqty32,0)+isnull(sizeqty33,0)+isnull(sizeqty34,0)+isnull(sizeqty35,0)+'+
'isnull(sizeqty36,0)+isnull(sizeqty37,0)+isnull(sizeqty38,0)+isnull(sizeqty39,0)+isnull(sizeqty40,0) <> 0)'+
' order by ColorSeq';

Hi,

I can’t reproduce this case with simple testcase
testcase.zip (89.8 KB)

Hi,
Your testcase hasn’t “Master/Detail” relationship. If I removed “Master/Detail” relation, filter is OK.

Hi,

filter on detail table also works as expected
testcase.zip (90.0 KB)

Hi,
Noted with thanks. I will try to find out the root cause.

1 Like