VB6 App crashes when initialising Crystal Reports XI SP6 References in Form

I am adding some reporting capability to a longstanding VB6 application using Crystal Reports X1 R2 SP6 Developer Edition. The development PC is Win 7 32bit. Everything works exactly as it should both in the IDE and as a compiled application on the same PC.

Created an installer within VB6 but had numerous issues with Crystal not finding dependency files. Come back to that issue later.

Installed Crystal Report X1 R2 SP6 on client PC's manually - regular edition.

Installed the app on the two client PC's both 64bit one Win 10 and the other Win 7. The app runs fine however when it comes to executing the following lines the app crashes immediately with unhandled exception and no real information provided by debugger.

Option Explicit

Dim appln As New CRAXDRT.Application
Dim ConnectionInfo As CRAXDRT.ConnectionProperties
Public crReport As New CRAXDRT.Report
Public crDatabaseField As CRAXDRT.DatabaseFieldDefinition

The CRAXDRT file is located in C:\Program Files (x86)\Business Objects\Common\3.5\bin on both pc's.

Crystal reports works fine on both pc's and is able to open the defined reports and produce the relevant report from the database attached.

I would appreciated any pointers please to get the app working with Crystal on the client PC's.
Edward CooperDirectorAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Ido MilletConnect With a Mentor Professor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
You need to deploy using the Merge Modules for XI R2.  Deploying individual dependencies is not supported for that version.

Alternatively, there are 3rd-party viewers that your application can call via command line API. Removing the need for you to grapple with such issues. See http://kenhamady.com/bookmarks.html
0
 
mlmccCommented:
Are you sure it is crashing there?

What error message do you get?

CR XI R2 is strictly 32-bit so you need to use 32-bit database connections.

mlmcc
0
 
Edward CooperDirectorAuthor Commented:
I dont even think it is getting as far as setting up a database connection as that is done later in teh coding in the Form Load event.

Option Explicit

Dim appln As CRAXDRT.Application
Dim ConnectionInfo As CRAXDRT.ConnectionProperties
Dim crReport As CRAXDRT.Report
Dim crDatabaseField As CRAXDRT.DatabaseFieldDefinition
Dim crxDBTable As CRAXDRT.DatabaseTable
Dim crxDBField As CRAXDRT.DatabaseFieldDefinition
Dim crxFormulaFields As CRAXDRT.FormulaFieldDefinitions
Dim crxFormulaField As CRAXDRT.FormulaFieldDefinition

Public strSelectionRecords As String
Public strSort_Order As String
Public strSort_Dir As String
Public strPrint_Orientation As String
Public strGroup_By As String



Private Sub Form_Load()
   
    Dim intIndex, intResponse As Integer
    Dim strcnnSQL, strSelectionFormula, strProvider As String
   
   
    On Error GoTo ErrHandler
   
   
    If blnDebug Then
        Call Write2Log(strLogPath, "frmEmpReport - Crystal Reports Prior Initialisation")
    End If
   
    ///Not even writing to debug log as crashed before this point.


    Set appln = New CRAXDRT.Application
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
mlmccCommented:
Does the user have permissions to read CRAXDRT?

mlmcc
0
 
Edward CooperDirectorAuthor Commented:
Hi

Just in case I added myself as a user for the BIN folder with full permissions and tried again but still same issue of crashing. In the same user login I can successfully run the Crystal Reports application itself without any difficulty including extracting information from the SQL database using the defined report.
0
 
mlmccCommented:
DO you have the debug flag turned on?

Do you get an error message?

mlmcc
0
 
Edward CooperDirectorAuthor Commented:
Yes debug flag is on but nothing written to the file.

Even tried putting CRAXDRT.DLL into the SysWow64 folder and registering. Still produced teh same crash with no error logging recorded.
0
 
mlmccConnect With a Mentor Commented:
Without some kind of error it is difficult to figure out what is wrong.  You are trying to use relatively old technology on newer platforms.

Any particular reason to not migrate to Visual Studio 201x and the version of Crystal for it?

mlmcc
0
 
Edward CooperDirectorAuthor Commented:
yes that is in the game plan for next year. I think that I will have to dump Crystal Reports in favour of possible List & Labels that works across a number of development platforms including VB and .Net.


Thanks for your help anyway.
0
 
Edward CooperDirectorAuthor Commented:
Thank you Ido I think that you right it is most likely to do with me not using the merge module route to incorporate the crystal report XI R2 elements. Currently setting up Visual Installer 1.1 that will permit the adding of the MSM's.
0
 
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
Good  :o)
0
 
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
Inactive Thread.
0
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.

All Courses

From novice to tech pro — start learning today.