Results 1 to 2 of 2
  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2010

    Found sollution for Crystal Reports not closing data con

    I have been all over the internet to find a way to get CR to close the data connection without closing the whole program. I have seen many posts saying programmers have abandon CR because of this problem.

    I was using CR to print bid sheets generated by VB6. I could open and print anything I wanted out of 9 different styles on the print layout page. After I closed the print layout page I couldn't go back into it or access the data file without completely closing my program first.

    My solution:
    I made my print layout page a stand alone exe. When I pushed the print button it would close the connection in the main program to the database I was using and make a copy in another location, then it would reopen the connection in the main program. I could then open the print layout page using the shell function and access the new data location to do all my printing with updated info in the database. When I close the print layout page it also closed the CR data connection. This works good as a static database because each time you open the print layout page it updates the database to the info your working with. Works great for me. Thought I would pass this on to any one with the same problem.

  2. #2
    Super Moderator Hack's Avatar
    Join Date
    Aug 2001
    Searching for mendhak

    Re: Found sollution for Crystal Reports not closing data con

    I think this deserves being saved...moved to the CodeBank
    Please use [Code]your code goes in here[/Code] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section.

    Creating A Wizard In VB.NET
    Paging A Recordset
    What is wrong with using On Error Resume Next
    Good Article: Language Enhancements In Visual Basic 2010
    Upgrading VB6 Code To VB.NET
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.