Solved

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

Posted on 2016-10-20
12
13 Views
Last Modified: 2016-11-12
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.
0
Comment
Question by:Sprint-Data
  • 5
  • 4
  • 3
12 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 41851940
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
 

Author Comment

by:Sprint-Data
ID: 41851965
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
 
LVL 100

Expert Comment

by:mlmcc
ID: 41852104
Does the user have permissions to read CRAXDRT?

mlmcc
0
 

Author Comment

by:Sprint-Data
ID: 41852137
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
 
LVL 100

Expert Comment

by:mlmcc
ID: 41852158
DO you have the debug flag turned on?

Do you get an error message?

mlmcc
0
 

Author Comment

by:Sprint-Data
ID: 41852172
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 250 total points (awarded by participants)
ID: 41852216
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
 

Author Comment

by:Sprint-Data
ID: 41852247
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
 
LVL 22

Accepted Solution

by:
Ido Millet earned 250 total points (awarded by participants)
ID: 41856804
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
 

Author Comment

by:Sprint-Data
ID: 41856925
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
 
LVL 22

Expert Comment

by:Ido Millet
ID: 41856928
Good  :o)
0
 
LVL 22

Expert Comment

by:Ido Millet
ID: 41884542
Inactive Thread.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

746 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

10 Experts available now in Live!

Get 1:1 Help Now