Buena idea!serge_girard wrote:Javier,
You can call Limpia with a button in order to reset your filters.
Serge



Saludos
Moderator: Rathinagiri
Buena idea!serge_girard wrote:Javier,
You can call Limpia with a button in order to reset your filters.
Serge
OK serge_girard,serge_girard wrote:Javier,
Try to make to same selection but USE the files WITHOUT indexes, then see if you still get an empty record in grid_2.
Following the code there is 1 record that meats the selection (total items:1) but the index-record pointer is probably at eof(). So try without indexes.
If you need to show the recors in a special order you can sort them afterwards. Simple code which I can supply if you want.
Greetings and succes!
Serge
serge_girard wrote:Javier,
If you need to show the recors in a special order you can sort them afterwards. Simple code which I can supply if you want.
serge_girard wrote:Javier,
Try this, it can take many selections:
Code: Select all
PROCEDURE Selecciona(nCampo) .... Filter := {} IF !EMPTY(c1) AADD(Filter, {|| Zapatos->(Tipo) == c1}) ENDIF ...... DO WHILE .not. eof() IF EvalFilter() Zapatos1->(DBAPPEND()) Zapatos1->Codigo := Zapatos->Codigo Zapatos1->Tipo := Zapatos->Tipo Zapatos1->Marca := Zapatos->Marca Zapatos1->Modelo := Zapatos->Modelo Zapatos1->Color := Zapatos->Color Zapatos1->Acabado:= Zapatos->Acabado ENDIF ....... STATIC FUNCTION EvalFilter() **************************** LOCAL retval := .T. LOCAL i FOR i := 1 TO LEN(Filter) retval := retval .AND. EVAL(Filter[i]) NEXT RETURN retval [/quote] Mi primera impresión es que si funcionaba, pero no entendía lo que hacia este código, después de investigar un rato ya vi como funciona. Ahora si que aplico la del folósofo "Yo sólo sé que no sé nada"! ;) Muy Interesante! :o /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// My first impression is that if it worked, but did not understand what made this code, after researching a while since I saw how it works. Now if I apply the the folosofo "I just know that I know nothing"! ;) Very interesting! :o Saludos