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.
Crystal Reports

Avatar of undefined
Last Comment
habibb

8/22/2022 - Mon
Mike McCracken

Not sure what you are getting at.

mlmc
habibb

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.



ASKER
dossbob

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.  
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER CERTIFIED SOLUTION
habibb

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
dossbob

Thanks, habibb.
It does exactly what I want.
habibb

My pleasure to help you