FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 25
→
WD21 - Table / Filter / Included between 2 bounds
WD21 - Table / Filter / Included between 2 bounds
Débuté par Mister ANDRE MARTINI, 19 oct. 2016 19:51 - 7 réponses
Connectez-vous…
Mister ANDRE MARTINI
#1
Membre enregistré
203 messages
Popularité : +25 (25 votes)
Posté le 19 octobre 2016 - 19:51
Olá pessoal,
no windev 21, numa Table com uma coluna tipo data é possível fazer um filtro por período com data inicial e final conforme imagens abaixo
Alguém sabe como implementar isso via programação?
O que eu descobri até agora ...
fiz este filtro de período e utilizei a função abaixo para ver o filtro salvo
s
FilterList is
string
=
TableFilteredColumn
(
TABLE_
Cre
)
FOR EACH
STRING
s
Filter OF
s
FilterList SEPARATED
by
CR
s
Col is
string
=
ExtractString
(
s
Filter
,
1
,
";"
)
n
Type is
int
=
ExtractString
(
s
Filter
,
2
,
";"
)
s
Val is
string
=
ExtractString
(
s
Filter
,
3
,
";"
)
Trace
(
s
Col
,
n
Type
,
s
Val
)
END
o retorno foi o seguinte:
COL_Vencimento 32082 20160501<TAB>20161019
Depois fiz um filtro utilizando a opção Contém e executei o mesmo código acima para ver o filtro salvo
o retorno foi o seguinte
COL_Numero_do_documento 31980 PED1
Daí tentei usar a função TableEnableFilter com a constante 32082 conforme retorno da função TableFilteredColumn
TableEnableFilter
(
TABLE_
Cre.COL_Vencimento
,
32082
,
EDT_
StartDate
+
TAB
+
EDT_
EndDate
)
deu erro dizendo que a constante 32082 não existe
Alguém sabe como implementar isso via programação?
--
André Martini
IS2 Automotive
http://www.is2.inf.br/is2automotive/index.html
IS2 Construtive
http://www.is2.inf.br/is2construtive/index.html
IS2 Store
http://www.is2.inf.br/is2store/index.html
IS2 Gerent
http://www.is2.inf.br/is2gerent/index.html
Signaler
0
0
Mister ANDRE MARTINI
#2
Membre enregistré
203 messages
Popularité : +25 (25 votes)
Posté le 25 octobre 2016 - 18:25
Alguém sabe como usar a opção [Included between 2 bounds] para filtrar um período numa TABLE?
--
André Martini
IS2 Automotive
http://www.is2.inf.br/is2automotive/index.html
IS2 Construtive
http://www.is2.inf.br/is2construtive/index.html
IS2 Store
http://www.is2.inf.br/is2store/index.html
IS2 Gerent
http://www.is2.inf.br/is2gerent/index.html
Signaler
0
0
Willian Fernando
#3
Membre enregistré
123 messages
Popularité : +46 (46 votes)
Posté le 25 octobre 2016 - 22:50
Andre , na DOC. não existe opção para esse caso. infelizmente
--
Atte. Willian Fernando
Signaler
0
0
Rubén Sánchez Peña
#4
Posté le 28 octobre 2016 - 16:39
Hi Andre. Did you try with hFilter function before refresh the table?
Signaler
0
0
Mister ANDRE MARTINI
#5
Membre enregistré
203 messages
Popularité : +25 (25 votes)
Posté le 28 octobre 2016 - 17:39
Sim, pelo HFilter eu já testei, mas o HFilter filtra o data file/query, eu quero o filtro só na table
--
André Martini
IS2 Automotive
http://www.is2.inf.br/is2automotive/index.html
IS2 Construtive
http://www.is2.inf.br/is2construtive/index.html
IS2 Store
http://www.is2.inf.br/is2store/index.html
IS2 Gerent
http://www.is2.inf.br/is2gerent/index.html
Signaler
0
0
Martin
#6
Posté le 26 juin 2018 - 15:28
Oi Andre, conseguiu fazer o filtro de datas na tabela por programação?
Estou com o mesmo problema.
Muito obrigado!
Signaler
0
0
FABRÍCIO ALMEIDA
#7
Posté le 31 août 2018 - 20:46
// FILTRO ENTRE DATAS VIA TABLE
TableEnableFilter
(
TABLE.COL_DATA_1
,
filterGreaterOrEqual
,
E
DT_DATA_INICIAL
)
TableEnableFilter
(
TABLE.COL_DATA_2
,
filterLessOrEqual
,
E
DT_DATA_FINAL
)
Signaler
0
0
FABRÍCIO
#8
Membre enregistré
1 message
Posté le 31 août 2018 - 21:00
// Basta duplicar a coluna da data que deseja filtrar, após isso
// no botão que deseja filtrar, coloque assim:
TableEnableFilter
(
TABLE.COL_DATA_1
,
filterGreaterOrEqual
,
E
DT_DATA_INICIAL
)
TableEnableFilter
(
TABLE.COL_DATA_2
,
filterLessOrEqual
,
E
DT_DATA_FINAL
)
--
FABRÍCIO ALMEIDA
Programador WINDEV, WEBDEV e WINDEV Mobile
E-mail: fabricioalmeida.contato@gmail.com
Skype: cursoswindev@gmail.com
Signaler
0
0
→ Revenir à WINDEV 25
WINDEV 25
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte