Link to home
Start Free TrialLog in
Avatar of dossbob
dossbobFlag for United States of America

asked on

Need a Crystal Report that moves to next parent when child records reach a running total

I'm using Crystal Reports 10. I have a Inventory table with Items and a quantity on-hand. I have another table of Inventory Transactions, each with an Item and a transaction quantity.

For each Inventory record, I want to start displaying Transaction records and keep a running total of the transaction quantities. When the running total exactly matches the the on-hand quantity, I want to stop displaying Transaction records, and move to the next Inventory record.

For performance, I'd rather do this in the initial selection of Transactions, but if necessary I can retrieve all Transactions, then limit what I print.

Any suggestions would be appreciated.
Avatar of Mike McCracken
Mike McCracken

Not sure what you are getting at.

mlmc
you can apply formula in suppress tab to group detail section like

if  runningtotal  > = quantityinhand  then
    true
else
   false

in this way transactions will display untill running total is less then quantity inhand.
I hope I have underestand your problem.



Avatar of dossbob

ASKER

habibb.

The formula looks like what I want to do, but I don't understand (yet) where to put the formula. I won't be able to work on it again until Friday afternoon. At that time, I'll experiment, and post my results.

Thanks for the suggestion.  
ASKER CERTIFIED SOLUTION
Avatar of habibb
habibb
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dossbob

ASKER

Thanks, habibb.
It does exactly what I want.
My pleasure to help you