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

Posted on 2004-11-06
Last Modified: 2010-04-23
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 form to a crystal report and then
back to the form?

Thank you!
Question by:RuthD2004
    LVL 4

    Expert Comment


    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.

    LVL 4

    Accepted Solution

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
    Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now