Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to sum header field?
Message
De
26/05/2006 05:51:59
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
How to sum header field?
Divers
Thread ID:
01125187
Message ID:
01125187
Vues:
59
Hi Guys,

This might be a stupid question, but I am pretty much poofed out.

I have two tables: an Invoice Header table (invh) and its Detail table (invd).

Supposing these are the contents:

INVH.dbf
InvNo Date Tax Amount
001 5/11 100.00 1000.00 - has 2 child recs
002 5/13 125.00 1250.00 - has 1 child rec
003 5/25 80.00 800.00 - has 3 child recs
004 5/26 50.00 500.00 - has 1 child rec

INVD.dbf
InvNo Prodcode Qty Price
001 A1 Some value...
001 B2 Some value...
002 B1 Some value...
003 B1 Some value...
003 C3 Some value...
003 C4 Some value...
004 A5 Some value...

- I then created a report form to list all the invoices and the respective details.
- The report is grouped by InvNo
- INVH is related into INVD via InvNo (obviously)
- SET SKIP TO InvD is also enforced (which means each header will be in effect for every matching detail record)

Question: How do I get the total TAX value using a report variable? In the example above it should amount to 355.00. Since I use SET SKIP, the total I get is wrong since the tax value is added for every matching child record.

Thanks and God bless.

Dennis
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform