Solved

CR10 and VB6

Posted on 2004-10-27
1,168 Views
Last Modified: 2008-01-09
HELP!  I am attempting to create a VB6 application using the cr10 viewer.  I can get the application to work correctly on a machine with Crystal 10 developer loaded, but I cannot deploy the VB application.

I am using the standard VB package and deployment wizard.  After installing on the client machine, I attempt to run the vb app and pull a report.  I get the error

Failed to load database information.
Details: The database DLL 'crdb_oracle.dll' could not be loaded.

I have included this DLL in the package and it exists in the correct location on the client machine.

What am I doing wrong??

Pod
0
Question by:Podzach
    13 Comments
     
    LVL 10

    Expert Comment

    by:ebolek
    0
     

    Author Comment

    by:Podzach
    Emre.   Well, I added the Oci.dll to my project and re-deployed.  Now I am getting an error that says

    Unknown Query Engine Error.

    Is this because I did not load the entire Oracle client on the destination PC?  We used to have a VB application that worked with our Crystal 7 reports, but since we upgraded all our PCs to XP, we had to upgrade to Crystal 10.  With the old version, we did NOT have to have the Oracle client loaded on each and every PC.  Any other ideas?

    Thanks for the quick turn around,
    Pod
    0
     
    LVL 100

    Expert Comment

    by:mlmcc
    0
     
    LVL 10

    Expert Comment

    by:ebolek
    This error message is sucha  common error message. it comes like it is a database error but it could be many other things. Are you sure that your code works. I would check how you load your report to the viewer. usually when the connection is wrong you get this error. Are you using ODBC.I got this error after deployment and the user was missing an ODBC connection

    I am not exatcly sure but give it a shot, and tell us what happened

    Regards
    Emre
    0
     
    LVL 1

    Accepted Solution

    by:
    Hi,
        You don't need to add oci.dll to your project and all you need to do is add the <oracle home>/bin to your PATH environment variable.
        It seems that your reports are created to access Oracle natively. Doing so requires us to install Oracle client (http://support.businessobjects.com/library/kbase/articles/c2015781.asp). When crystal report try to access Oracle, it will load oci.dll for assistant.
        When we deploy CR viewer, we need some DLLs that is to be located at "C:\program files\common files\crystsal decisions\2.0\bin" and also a registry entry of:
              [HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\9.0\Crystal Reports]
              "CommonFiles"="c:\\program files\\common files\\crystal decisions\\2.0\\bin"
         Use Dependency walker (http://www.dependencywalker.com/) to trace your application and look for missing DLL. Some must-exist files include crviewer9.dll, craxdrt9.dll, crqe.dll, querybuilder.dll, crdb_oracle.dll and ufmanager.dll (look http://support.businessobjects.com/library/kbase/c2012421.asp for more details)
       
    0
     
    LVL 1

    Expert Comment

    by:ccwork
    Hi,
        If your reports are created from previous of Crystal Report, you also need to deploy "implode.dll".
    0
     

    Author Comment

    by:Podzach
    Thanks for the great replies.  Although I am still having the problem.  I was hoping to be able to deploy this VB app WITHOUT having to install the Oracle client on every machine.  From the sounds of things, I may just have to grin and install it.  Unless anyone else has a good idea.

    Thanx
    Pod
    0
     

    Author Comment

    by:Podzach
    OK.  Frustration is reaching a peak here.  I loaded the full oracle client on the host machine.  I can use sqlplus to query the oracle database.  However, I am still getting an error.  
    I have a form with a crystalActiveXReportViewer on the form. And I have this code

    Option Explicit
    Dim ConnectionInfo As CRAXDRT.ConnectionProperties
    Dim crxApplication As New CRAXDRT.Application
    Public Report As CRAXDRT.Report

    Private Sub Form_Load()
    Dim crxDatabaseTable As CRAXDRT.DatabaseTable
    Set Report = crxApplication.OpenReport("c:\FTG_Services_Totals.rpt", 1)
    CRViewer1.ReportSource = Report
    Set ConnectionInfo = Report.Database.Tables(1).ConnectionProperties
    ConnectionInfo.Item(ConnectionInfo.NameIDs(0)) = "Prod"
    ConnectionInfo.Item(ConnectionInfo.NameIDs(1)) = "Crystal"
    ConnectionInfo.Item(ConnectionInfo.NameIDs(2)) = "Reports"
    CRViewer1.ViewReport
    End Sub
    Private Sub Form_Resize()
    CRViewer1.Top = 0
    CRViewer1.Left = 0
    CRViewer1.Height = ScaleHeight
    CRViewer1.Width = ScaleWidth
    End Sub


    Pretty simple.  This code works fine on a machine with the Oracle Client and Crystal Developer 10 installed on it. I checked and this machine does NOT have any User DSNs loaded and both machines point to the same TNSNAMES.ora file on the network.  Both machines are running windows XP.

    I have used the  Visual Studio Installer to create an installation.  Including the merge files from Crystal.  Installations works fine.  Placed a copy of the FTG_Services_Totals.rpt on C: .  Execute the application and get the error

    Failed to load database information.
    Details: The database DLL 'crdb_oracle.dll' could not be loaded.

    I am reaching the end of my rope here!  There have been some VERY good suggestions, but I am still having this one last glitch. HELP!!!

    Pod
    0
     

    Author Comment

    by:Podzach
    Let's throw another quirk at this.  I installed Crystal 7 and upgraded to Crystal 10 on the client machine I am working with.  Now I am getting the same error in Crystal Developer on the Client machine!!!!  

    Pod
    0
     
    LVL 1

    Expert Comment

    by:ccwork
    Hi,
        you have to create an instance of CRAXDRT.Application before "Set Report = crxApplication.OpenReport("c:\FTG_Services_Totals.rpt", 1)". And does the <oracle home>/bin appear in your PATH? The Oracle client should be 8i or above that you will find oci.dll in <oracle home>/bin.
    0
     

    Author Comment

    by:Podzach
    Hey ccwork.  
       I do have the oci.dll on the machine.  I can acutally use sqlplus to get to the database just fine.  ON the third line of the code above, I have : Dim crxApplication As New CRAXDRT.Application.  That creates an instance, right?  Is there anything else I have to do with the object crxApplication  before opening that report?

    Thanks in advance
    Pod
    0
     
    LVL 1

    Expert Comment

    by:ccwork
    Hi,
        Try to open the report with your crystal report and then refresh data. See if you could view the report.
         Try to use Dependency walker, as stated above, to trace what is missing. Perhaps you will spend few minutes on how to use it.
    0
     

    Author Comment

    by:Podzach
    Thanks for the comments.  What I finally had to do was rewrite the reports using an ODBC connection vs a native oracle connection.  Works great on XP now.  I just wish it worked on Citrix on NT.

    Please give the points to ccwork.

    Thanks again all!
    0

    Write Comment

    Please enter a first name

    Please enter a last name

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

    Featured Post

    Course: JavaScript Coding - Massive 12-Part Bundle

    Regardless of your programming skill level, you'll go from basics to advanced concepts in a vast array of JavaScript subjects including Sammy.js, Agility.js, Ember.js, Node.js, jQuery, AJAX, Extjs, AngularJS, Knockout.js, and JSON.

    Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
    Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
    This video Micro Tutorial is the first in a two-part series that shows how to create and use custom scanning profiles in Nuance's PaperPort 14.5 (http://www.experts-exchange.com/articles/17490/). But the ability to create custom scanning profiles al…
    Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

    875 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

    13 Experts available now in Live!

    Get 1:1 Help Now