Crystal Reports Viewer ActiveX Control in Visual FoxPro 9 Keeping Foxpro Tables Open

    Question by:
    On

    Topics:

    We have a form in our software package that runs the Crystal Reports Viewer 9.2 ActiveX control written in Visual FoxPro 9 SP2. The crystal reports we use have been written to read our VFP table data through ODBC. The crystal reports viewer works well, as I've used Experts' Exchange several times to get that piece to operate.

    However, we have several features in our software that requre large and secure transaction processing, therefore we sometime need exclusive use of specific tables in our database. Since our application is typically shared over a network by many users, one user might have the crystal report viewer open with a report that uses a table which another user needs to use exclusively.

    My question is: can the crystal reports viewer (or perhaps the crystal reports themselves) be written to close the VFP tables it uses once the report has been run without having to completely close the form containing the crystal report viewer?

    I have tried to read the DownloadFinished property of the ActiveX control, but that has never returned true. Perhaps there is another property I can read, or a method I can run to close the VFP tables or data connection without having to close the resulting report.

    FYI - These same reports, when run with the full Crystal Reports 2008 also leaves the VFP tables open without being able to get exclusive use.
     

    Verified Answer?

    The member who asked this question verified this comment provided the solution that solved their problem.

    by:Posted on 2011-04-05 at 10:14:55ID: 35326027

    As far as I know, you can't control whether the tables remain open or not.  The data control is internal to the viewer or runtime engine.

    There is a method you can use to run reports but it probably would require you to rebuild the reports.
    It allows you to pass a dataset from the application to the report thus the database doesn't need to remain open.

    Another idea would be to change where the reports get the data to a temp database.  In this idea you would copy the data or tables you need to another database, perhaps in the users local space, then run the report from that database.  I know of at least 1 application that does that.

    mlmcc
    This content is available to Experts Exchange members

    See the answer now
    with your Free 30 Day Trial

    Get unlimited access to solutions & experts

    • 4,169,477 solved questions
    • 3,805 articles & videos
    • 15,413 tech experts

    Get Access Now

    Ask Your Tech Question. Get Expert Solutions.We will email you when an expert has commented on your question.

    We will never share this with anyone. Privacy Policy Terms of Use

    Select topics

    You may select up to five topics.

    Top Expert Contributor

    Essential articles and videos from the Experts

    More valuable questions with Expert answers

    201508-LO-Qu-072

    EXPERT WHO ANSWERED

    mlmcc

    mlmcc has answered 14,463 questions on Experts Exchange and is an expert in Crystal Reports, DB Reporting Tools and .NET Programming.

    RELATED TOPICS view all topics

    1. DB Reporting Tools
      (7,838)
    2. .NET Programming
      (129,712)
    3. Visual Basic.NET
      (90,483)
    4. ASP.NET
      (121,160)
    5. Visual Basic Classic
      (162,160)
    6. MS SQL Server
      (152,756)
    7. MS SQL Server 2005
      (71,299)
    8. Databases
      (52,089)
    9. C#
      (89,484)
    10. Oracle Database
      (76,656)