Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to have calculaltion in Report Grouping
Message
 
 
À
17/06/2002 23:27:18
Ransome So
Ransome's Workshop
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00669557
Message ID:
00669566
Vues:
12
>Dear all,
>
>In my report the stock is grouped as ItemID and Batch in which ItemID identify the Item in Stock and Batch identity the actual stock level, say If My stock of Acetone I have 1 bottle of 500 ml and 1 bottle of 100 ml.
>
>In the report of dispense, I record the Date, Quantity and BatchID whicn I consumed.
>In the report it show the history say
>
>Acetone
>    xxxxxx001   500ml
>       2-4-1990    300   Consumed
>       6-6-1992    100   Consumed
>       ---------------------------
>                   400
>
>Here I can sum up the total consumed volume, but I fail to calcualate the quantity left by OriginalQuantity-sum(ConsumedQuanttiy) at Batch group footer which the program report nonexisting of sum.prg(!)
>
>Is there anything wrong or otherwise calculate the result by another view before getting the report??
>
>Regards,
>
>
>
>Ransome

You have to use report variables. Create a variable, called Comnsumed_Qty. Set initial value to 0, value to store Consumed, reset at Batch Group and set calculation - Sum.

Then just put OriginalQty - Consumed_Qty where you need to put your Total.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform