Fórum QRExpr - Como funciona o IF dentro? #334232
05/12/2006
0
Como funciona a lógica do if dentro do QRExpr?
Quero fazer algo parecido
if qryvendasTipoDoc.asstring = ´V´ then Total := Total + qryVendasTotalVendas.asfloat else if qryVendasTipoDoc.asstring = ´D´ then if QryVendasTroca.asstring = ´S´ then Total := Total + QryVendasTotalVendas.asfloat
Obrigado
D7
Facc
Curtir tópico
+ 0Posts
06/12/2006
Facc
if qryvendasTipoDoc.asstring = ´V´ then Total := Total + qryVendasTotalVendas.asfloat else if qryVendasTipoDoc.asstring = ´D´ then if QryVendasTroca.asstring = ´S´ then Total := Total + QryVendasTotalVendas.asfloat
Sobe
Gostei + 0
06/12/2006
Emerson Nascimento
if (qryvendasTipoDoc.asstring = ´V´) or ((qryvendasTipoDoc.asstring = ´D´) and (qryvendasTroca.asstring = ´S´)) then Total := Total + qryVendasTotalVendas.asfloat;
SUM(IF(qryvendas.TipoDoc=´V´ Or (qryvendas.TipoDoc=´D´ and qryvendas.Troca=´S´),qryvendas.TotalVendas,0))
obs: não testei, portanto não sei se funciona. por favor avise-nos sobre o resultado.
Gostei + 0
06/12/2006
Facc
if (qryvendasTipoDoc.asstring = ´V´) or ((qryvendasTipoDoc.asstring = ´D´) and (qryvendasTroca.asstring = ´S´)) then Total := Total + qryVendasTotalVendas.asfloat;
SUM(IF(qryvendas.TipoDoc=´V´ Or (qryvendas.TipoDoc=´D´ and qryvendas.Troca=´S´),qryvendas.TotalVendas,0))
Tá trazendo sempre valor 0 (zero)
Gostei + 0
06/12/2006
Facc
Gostei + 0
06/12/2006
Facc
[b:fed6f5b465]Como monto isso num QRExpr?[/b:fed6f5b465]
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)