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

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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

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

kelsanitAuthor 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
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

Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

kelsanitAuthor 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.
You need to change the variables to SHARED instead of GLOBAL in the main and subreport


Experts Exchange Solution brought to you by

Your issues matter to us.

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

Start your 7-day free trial
kelsanitAuthor Commented:
Worked great.

You are awesome.
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.