Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subtotals and totals
Message
De
12/07/2006 13:22:54
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
12/07/2006 11:39:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01135680
Message ID:
01135783
Vues:
13
>Rather than trying to fix what I've apparently done wrong, can someone just tell me how to do it correctly from the start?
>
>Here are some of the fields in my cursor:
>
>order_no, qty, price, frt
>
>Here are a few sample records for order #100:
>
>100, 10, 1.23, 50
>100, 20, 2.00, 50
>100, 10, 1.50, 50
>
>As you can see, "frt" is in each record, but is the total freight for the order.
>
>My invoices show all three detail lines:
>
>QTY 10, $1.23/ea $12.30
>QTY 20, $2.00/ea $40.00
>QTY 10, $1.50/ea $15.00
>
>Then the subtotals look like this:
>
>SUB: $ 67.30
>FRT: 50.00
>TOT: $217.30
>
>The FRT is showing correctly as $50, but is adding $50 three times (once for each detail line).
>
>Suggestions for changes to my form?

No, but a suggestion for changes to the code which prepares your cursors: blank the frt_chrg on any record that isn't the first (or last, depending on which one you print) record for the order. So you'd have it only once; it'd still add it six times, but the other five would be zero and you'd get the correct total.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform