Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculated expression from two expression
Message
De
30/09/2006 06:50:37
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
01158307
Message ID:
01158364
Vues:
20
>Hi All,
>i've two field on detail band and has a below codes
>
>* for debit field
>
>IIF(crsresult.fischcode $ " '101','104','105','108','112','303','114','306','002','004','006','012','014','016','019','020','026','028','037','039','040','044','202','309','310','007','008','023','024' ",crsresult.amount,0)
>
>
>* for credit field
>
>IIF(crsresult.fischcode $ " '102','103','106','109','113','115','001','003','005','011','013','015',; '017','018','025','027','036','038','041','045','201','301','302','311',; '312','009','010','021','022' ",crsresult.amount,0)
>
>
>it works fine for my need. i wantto also show at 3rd field debit-credit action,
>expressions is too long for this :(
>
>how can i do this ?
>
>any suggestion will be very appreciated
>
>TIA

Soykan,

What I do is if the amount > 0, it is debit. < 0 is credit

So you have something like
select iif(amount > $0, amount, $0)  as debit, ;
       iff(amount < $0, -amount, $0) as credit, ;
       amount ;  && third field
    from ...
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform