Thanks Noam,
I would like to try and avoid the expression in memory because of performance issue like you said.
the sql where is more suitable.
I changed the syntax to:
Relations.Add(Tnoot_KfilutLefiTnaim, Tnoot_KfilutLefiTnaim.SortByChshbonOtarikhAsmkta).Where.Add(
"{0} = {1} AND {2} = {3} AND {4} = {5} AND {6} = {7} AND {8} = 0",
Tnoot_KfilutLefiTnaim.MsprAsk, TnuotZmaniot_Hitzoni.MsprAsk,
Tnoot_KfilutLefiTnaim.TarikhAsmkta, TnuotZmaniot_Hitzoni.TarikhAsmkta,
Tnoot_KfilutLefiTnaim.SkomKollMam, TnuotZmaniot_Hitzoni.SkomKollMam,
Tnoot_KfilutLefiTnaim.Asmkta.Exp_GetSfarotAharonot(_parent.MisparSfarotAsmahta), TnuotZmaniot_Hitzoni.Asmkta.Exp_GetSfarotAharonot(_parent.MisparSfarotAsmahta),
Tnoot_KfilutLefiTnaim.IsKfilutSheNivdeka);
but, in runtime it is translated to:
"(MsprAsk = 28 AND TarikhAsmkta = '20250101' AND SkomKollMam = 118.0 AND 0 = 0 AND
IsKfilutSheNivdeka = 0)"
the part with the method the returns the last digits of a number is not translated in runtime.
any idea why ?
'Asmkta' is a
NumberColumn and the '
Exp_GetSfarotAharonot ' method return a Number.
(also tried that it will return a NumberColumn but didn't work also).
also tried ToString() for the '
Exp_GetSfarotAharonot' and use "LIKE" in the formula, but also didn't work.