Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 181
  • Last Modified:

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!
  • 2
1 Solution

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.

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.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now