Crystal Reports - Use formual value on following line calcuation

Have the attached crystal report that is taking the "QTY ON HAND" - "QTY Orderd"   - I need to use that value on the following line and there after on all rows.  The fomula value then become the qty on hand for the next row evaluation.  I know you can do this with variables but not exactly sure how.sub.rpt

Example:
Item: 85586   qty ordered: 60   ordernumber: 85586  duedate: 5/14/2015 qtyonhnad: 200   fomula(qty available)=140
Item: 85586   qty ordered: 5   ordernumber: 85587  duedate: 5/15/2015 qtyonhnad: 140   fomula(qty available)=135
Item: 85586   qty ordered: 10   ordernumber: 85588  duedate: 5/16/2015 qtyonhnad: 135   fomula(qty available)=125
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
Is the attached modified report what you want?

Basic idea

Add a formula in the group header to set the initial quantity.
Add a formula to the details to show the on hand quantity
Add a formula (evaluated after the display) to calculate the new available quantity

mlmcc
sub.rpt
0
Author Commented:
Yes! that works great but now my running total in the GF1 that is set to return the minimum date when "qty available" <0 is not working and I can not set evaluation based on that variable. Is there another wayt to do this?

example:  in the saved data on the report t- the running total shoudl return 5/18/2015  as that is the earliest date when the abailable inventory goes negative
0
Commented:
Sorry.  I didn't see that since it was blank.

I modified 2 formulas and added a display for the date.

I changed the formula in the group header to set the run out date to 1 Jan 1900.
I changed the Calc formula to test if the result was negative then set the run out date to the ship date

Disp checked if you run out and displays an appropriate message

mlmcc
sub.rpt
0
Author Commented:
values in the sub report look perfect now and date is working - however, when i insert this as a sub report into my main report it is no longer pulling the variable.  Previously, it was setup as shared varable.

I changed the display variable in the main report to match the global varable you set but will not pull data over in the main report.
0
Commented:
You need to change the variables to SHARED instead of GLOBAL in the main and subreport

mlmcc
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Author Commented:
Worked great.

You are awesome.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.