How to pass a variable from a form to crystals reports and then back to form

I have created a crystal report that groups items to be ordered by vendor.  At the Vendor Header, I want to add 1 to the intLastPo variable so po numbers are automatically generated, one for each vendor on the report.

The LastPO# field is stored in my system record, DC_System.
On my Form, I want to create the beginning po #, intPO equal to DC_System.LastPO#
Pass that variable, intPO to my Crystal Report where it accumulates and at the
end of the report, pass the variable back to my form so I can update the file with the
last po number printed.

Can you show me how to pass a variable from a vb.net form to a crystal report and then
back to the form?

Thank you!
 
RuthD2004Asked:
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.

GlomCommented:
Hi,

I'm afraid this could not be done. Crystal Reports is a reporting application and not a processing app. It is made only for viewing data of a database in its current state. This is a one-way cummunication : from your app to Crystal Reports.

Glom
0
GlomCommented:
I think your solution is to also calculate the result in the program that calls the report, with the same formula. And then update your file with the value you calculated.

Hope this could make it.
0

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
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
Visual Basic.NET

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.