edutraini Posted June 17, 2014 Report Share Posted June 17, 2014 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}) Quote Link to comment Share on other sites More sharing options...
Theotokos Posted June 17, 2014 Report Share Posted June 17, 2014 Acho que OrdScope não vai dá!!! Mas você pode tentar com Indice Temporário... Dê uma olhada neste links: http://fivewin.com.br/index.php?/topic/20860-ordscope-com-mais-de-uma-condi%C3%A7%C3%A3o/?hl=%2Bindice+%2Btemporario#entry257998 http://fivewin.com.br/index.php?/topic/19224-hb-dbcreatetemp/?hl=%2Bindice+%2Btemporario#entry49184 Quote Link to comment Share on other sites More sharing options...
vagner Posted June 17, 2014 Report Share Posted June 17, 2014 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()) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.