Recent

Author Topic: (SOLVED) Filter not Working  (Read 3411 times)

InfoMan

  • New Member
  • *
  • Posts: 49
(SOLVED) Filter not Working
« on: March 24, 2012, 04:28:13 pm »
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.
« Last Edit: March 25, 2012, 03:19:30 am by InfoMan »

Laksen

  • Hero Member
  • *****
  • Posts: 794
    • J-Software
Re: Filter not Working
« Reply #1 on: March 24, 2012, 06:09:22 pm »
Have you tried something like this: ID_AGRAVO = "B019". I suppose it's a string and not a literal of sorts. :)

InfoMan

  • New Member
  • *
  • Posts: 49
Re: Filter not Working
« Reply #2 on: March 24, 2012, 07:12:04 pm »
Have 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

  • New Member
  • *
  • Posts: 49
Re: Filter not Working
« Reply #3 on: March 25, 2012, 03:19:11 am »
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.

« Last Edit: March 25, 2012, 03:45:10 pm by InfoMan »

 

TinyPortal © 2005-2018