Filter and Locate

Filter and Locate

Postby FerCastro » Mon 07 Apr 2014 20:11

Hello all

I am trying to use the locate method whith the following code:

VTPCon.Locate('ID_Emp;CCon', VarArrayOf(['nID_Emp;cClaveCon']), []);

But I can not locate the record. Is there something wrong?


---
I am trying to filter the same virtual table with the following code:

VTPCon.Filter := 'ID_Emp = ' + VTMov.FieldByName('ID_Emp').AsString;
VTPCon.Filtered := true;


---

Do am I missing something? Thanks and best regards!!
Last edited by FerCastro on Tue 08 Apr 2014 14:12, edited 1 time in total.
FerCastro
 
Posts: 47
Joined: Mon 26 Jun 2006 17:32
Location: México City

Re: Filter and Locate

Postby FerCastro » Mon 07 Apr 2014 22:23

Locate is orking fine, but the filter still doesn't works.

Any sugestion?

Regards!!
FerCastro
 
Posts: 47
Joined: Mon 26 Jun 2006 17:32
Location: México City

Re: Filter and Locate

Postby AlexP » Tue 08 Apr 2014 09:28

Hello,

Judging by the code

Code: Select all
VTPCon.Filter := 'ID_Emp = ' + VTMov.FieldByName('ID_Emp').AsString;
FNominaData.VTPeriodoConceptos.Filtered := true;


You are setting the filter value in the VTPCon table, and the Filtered parameter value - in the VTPeriodoConceptos table. Please make sure you are working with one and the same table
AlexP
Devart Team
 
Posts: 5525
Joined: Tue 10 Aug 2010 11:35

Re: Filter and Locate

Postby FerCastro » Tue 08 Apr 2014 14:14

Hello Alex!!

Working fine both procedures!

Thanks and best regards!!
FerCastro
 
Posts: 47
Joined: Mon 26 Jun 2006 17:32
Location: México City

Re: Filter and Locate

Postby AlexP » Wed 09 Apr 2014 07:43

You are welcome. Feel free to contact us if you have any further questions about VirtualTable.
AlexP
Devart Team
 
Posts: 5525
Joined: Tue 10 Aug 2010 11:35


Return to VirtualDAC