Jump to content
Fivewin Brasil

Filtrar dados


edutraini

Recommended Posts

bom dia pessoal uso dbsetfilter para poder filtrar os clientes de um determinado usuario que se conectou no sistema

conforme abaixo

O problema é que esta cada vez mais lento essa rotina eu consigo filtrar atraves do ordscope ou alguma outra dica

obrigado

DBSETFILTER({||CLI->VENDEDOR = VP_USU .OR. CLI->VENDEDOR1 = VP_USU .OR. CLI->VENDEDOR2 = VP_USU .OR. CLI->VENDEDOR3 = VP_USU .OR. CLI->VENDEDOR4 = VP_USU .OR. CLI->VENDEDOR5 = VP_USU})

Link to comment
Share on other sites

Olá, creio que vc criando um índice temporário, seria mais interessante ;)

DbSelect("Cli")

Index On Cli->(indexKey()) Tag _Temp_ To ArquTempo Custom Additive Memory

Cli->(DbGoTop())

bBloc := <|| If Cli->Vendedor == VP_Usu .or. Cli_Vendedor1 == VP_USU .or. Cli....

Cli->(OrdKeyAdd("_Temp_")

Endif

>

Cli->(DbEval(bBlc))

Cli->(DbSetOrder("_Temp_"))

Cli->(DbGoTop())

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...