(SOLVED) Filter not Working lazarus / 16-Databases ---------------------------------------------------------------------- InfoMan · 2012-03-24 15:28 Use a component TDbf to access the database that stores NINDNET.dbf all reported cases. In this database there is a field called ID_AGRAVO that contains a code for the type of case. Filtar all cases need to be ID_AGRAVO = B019 to display in a report, but is not working. The report is showing all cases that are in the database and not just those that are B019. Please help me. Thank you all. ---------------------------------------------------------------------- Laksen · 2012-03-24 17:09 Have you tried something like this: ID_AGRAVO = "B019". I suppose it's a string and not a literal of sorts. ---------------------------------------------------------------------- InfoMan · 2012-03-24 18:12 Quote from: Laksen on March 24, 2012, 06:09:22 pmHave you tried something like this: ID_AGRAVO = "B019". I suppose it's a string and not a literal of sorts. Yes. I tried. But not working also. Yes. ID_AGRAVO is a string. ---------------------------------------------------------------------- InfoMan · 2012-03-25 01:19 I managed to filter through the blank records OnFilterRecord event handler. For this, I did so: Accept := Copy(Trim(dadosNot.FieldByName('ID_AGRAVO').AsString),1,4) = 'B019'; Putting up with the accept parameter value of false records are ignored. There is a hint for those who need to do it like me, and thank you to everyone who tried to help me.