Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2006
    Posts
    2

    Cool Unanswered: VB 6.0 & Crystal Report 8.5 - Lot of Problems

    Hi all ,

    We are working on a CMS project, uses VB 6.0 with reports created in Crystal Report 8.5. We are accessing data from remote server.

    So, to install the CMS system, we created a package in VB, installed it on different systems on client side.

    On few systems, VB CMS working well but when we tried to open Crystal Reports, always showing the message - 'Run-time error '20532': Cannot find database DLL.' and i am not able to open any of the Report to view.

    I saw this problem before, so i already took precaution and added all DLL files need for the execution of Crystal Report. Even though it is showing the same error message. I search on internet, came accross the different articles suggesting me to add different DLL files, but i already added them to the package. Pleaseeee, suggest me something that will work and get me out of this biggest trouble of my life.

    Apart from this, on few systems, i am not able to connect to the remote database, the database is on remote server, where my web site is and i am trying to connect from client office. It is saying '[Microsoft ODBC SQLServer Driver][DBNETLIB]SQLServer does not exist or access denied.' I checked all known things but yet not able to solve it. I feel strange that when i am
    conncting to remote server from my system, i have to do nothing (by the way, my system is development system) but on client system, its not. Please have a look at the problem.



    Thanks and Regards,
    Anup

  2. #2
    Join Date
    Jun 2013
    Posts
    6

    Crystal Report (8.5) on win7/windows 2008 64 bit system

    Crystal Report (8.5) is not working on win7/windows 2008 64 bit system

    My application is a vb application and I am using Crystal report 8.5. It is working fine on 32 bit system and 64 bit system of Windows 2003 server. When I run the same application either on win7 64 bit or on 2008 64 bit, report does not open.
    I am using vb script to access the database.
    Part of the code written in the VB script file is as follows:
    Dim objrsRecordSet 'As RecordSet
    Dim strSQL 'As String

    '**** Open Database Connection using the parameters passed from the main program
    Set dbConnection = CreateObject("ADODB.Connection")
    dbConnection.ConnectionString = "Provider=SQLOLEDB;Server=" & mstrServer & ";uid=" & mstrUserName _
    & ";pwd=" & mstrPassword & ";Database=" & mstrDatabase & ";"

    dbConnection.Open
    dbConnection.CommandTimeout = 200

    dbConnection.Properties("Enable Fastload").Value = True




    When i run my application in debug mode it is working fine on windows 7 also. But when i run the application through the set up by consuming the dll of crystal report then it is not working, in this case report is not opening.




    Please help me out with this issue, i will appreciate for your response.

  3. #3
    Join Date
    Jun 2013
    Posts
    4
    Im also a user of VB and Crystal report 8.5 and I don't have a problem running it on Windows 7 64Bit and Windows 8 64Bit.

    When you deploy your application that uses CR8.5, make sure that CR8.5 Runtime files are also distributed with your setup package.

  4. #4
    Join Date
    Jun 2013
    Posts
    6

    Crystal Report (8.5) is not working on win7/windows 2008 64 bit system

    We included run time files in the set up.As you install the vb6.0 application set up on 64 bit operating systems , after installation crystal report8.5 dll will be placed into sysWOw64 folder .

    Basically we have two visual basic projects developed in VB 6.0 language: let’s say
    1. Diapp (we consume the report.dll in this application, in order to generating the reports)
    2. Adacrystalapp (which is used for making the report.dll)


    Diapp application generating the reports on windows-XP(32 bit machines) without any problems but when I run the same application on 64 bit machines(win7/Vista…etc) report is not generating.

    If I run the both applications (Diapp, Adacrystalapp) in debug mode(by using the visual studio 6.0) then reports are generating on 64 bit machines (win7/vista) also without any problems.

    If I run the Diapp application through the set up then report does not open on 64 bit operating systems.


    Please help me out with this issue, i will appreciate for your response.

  5. #5
    Join Date
    Jun 2013
    Posts
    4
    can you post the code on how you connect your vb6 app to crystal report?..
    how about any error messages?..

  6. #6
    Join Date
    Jun 2013
    Posts
    6

    Crystal Report (8.5) is not working on win7/windows 2008 64 bit system

    Thank you very much for your reply,

    Here is the code to connect the vb6 app to crystal report.



    Public Sub ReportProcessing(ByVal strReportID As String, strReportName As String, Optional ByVal objRsRecordSet As Object, Optional frmSource As Form)


    '************************************************* *********************************'
    Dim strScriptPath As String 'Used to store Script file path
    Dim strScriptName As String 'Used to store Script finle name
    Dim strReportPath As String 'Used to store Report file path
    Dim strArgumentFilePath As String 'Used to store Argument file path
    Dim lstItem As ListItem 'ListItem variable
    Dim lngResult As Long
    Dim TempServerName As String

    'Rajendra 1.99.1
    Dim strServer As String
    Dim strDatabase As String
    Dim strUserName As String
    Dim strPassword As String
    Dim strNodeId As String

    On Error GoTo ERRORHANDLER

    'Rajendra 1.99.1
    If Not frmSource Is Nothing Then
    Select Case frmSource.Name
    Case "frmAdminEntryAdministration", "frmAdminAccessGroup" _
    , "frmAdminExceptionDate", "frmAdminEventAdmin", "frmAdminFirmAdmin" _
    , "frmAdminPersonTimeGroup", "frmAdminComplex", "frmAdminAccessProfile"

    strServer = frmSource.mstrServer
    strDatabase = frmSource.mstrDatabase
    strUserName = frmSource.mstrUserName
    strPassword = frmSource.mstrPassword
    Case Else
    strServer = gstrServer
    strDatabase = gstrDatabase
    strUserName = gstrUserName
    strPassword = gstrPassword
    End Select
    Else
    strServer = gstrServer
    strDatabase = gstrDatabase
    strUserName = gstrUserName
    strPassword = gstrPassword
    End If

    If UCase(gpnlScreenID.text) = "DIATMDI" Then
    strScreenID = "DIATMDI"
    mstrNodeId = "_"
    mstrNodeName = ""
    Else
    'Get screen ID from MDI status panel
    strScreenID = UCase(gpnlScreenID.text)
    End If

    '**********Changed by Rajendra on 05-07-2002 to generate unique file name***************

    strNodeId = Replace(mstrNodeId, "\", "")
    strNodeId = Replace(strNodeId, "/", "")
    strNodeId = Replace(strNodeId, "*", "")
    strNodeId = Replace(strNodeId, "?", "")
    strNodeId = Replace(strNodeId, "<", "")
    strNodeId = Replace(strNodeId, ">", "")
    strNodeId = Replace(strNodeId, "|", "")
    strNodeId = Replace(strNodeId, ":", "")
    strNodeId = Replace(strNodeId, """", "")

    ' Return the specified file name in Temp folder of the system
    strReportPath = App.Path & "\" & strNodeId & "_" & strReportID & "_" & Hour(mdtCurrentTime) & Minute(mdtCurrentTime) & Second(mdtCurrentTime) & ".rpt"

    strArgumentFilePath = App.Path & "\" & gstrArgumentFileName

    strScriptPath = App.Path & "\" & strNodeId & "_" & strReportID & Hour(mdtCurrentTime) & Minute(mdtCurrentTime) & Second(mdtCurrentTime) & ".vbs"
    '************************************************* **************************************

    Screen.MousePointer = vbHourglass

    'Get Individual Connection to database
    lngResult = gobjADOLibrary.OpenConnectionObject(dbConnection, strServer, strDatabase, strUserName, strPassword, "sqloledb")

    If lngResult <> 0 Then
    MsgBox ERROR_BD, vbCritical
    Screen.MousePointer = vbDefault
    Exit Sub
    End If

    'Get general Details of the Report Selected
    strSQL = "SELECT ReportID, ReportName, ScriptName FROM rptReports WHERE ReportID = '" & strReportID & "'"
    lngResult = gobjADOLibrary.OpenRecordset(dbConnection, rsReport, strSQL)

    If Not rsReport.EOF Then
    strSQL = "SELECT ReportID, Template, TemplateName FROM rptReportsDef WHERE ReportID = '" & strReportID & "'"
    lngResult = gobjADOLibrary.OpenRecordset(dbConnection, rsGeneral, strSQL)
    'DownLoad Report From DataBase to Temp Folder of the System with name as DIARPTTMPLT.rpt
    If Not DownLoadFileFromDatabase(rsGeneral, rsGeneral.Fields("Template"), strReportPath) Then
    Screen.MousePointer = vbDefault
    MsgBox GetResString(20452), vbCritical '"Problem in Downloading Report file from database"
    Exit Sub
    End If

    'Check for Pre-Processing Script
    strScriptName = rsReport.Fields("ScriptName") & ""

    'Comparing some thing from resource string is not allowed GetResString( 20051) 'No Script
    If Trim(strScriptName) = "20051" Then 'ResourceID of "No Script"
    'Create object fo the user defined library

    Set libADACrystalLib = CreateObject("AdaCrystlLib.CrystalReport")

    If UCase(gstrServer) = "(LOCAL)" Then
    TempServerName = gstrMachineName
    Else
    TempServerName = strServer
    End If

    'Provide login information
    libADACrystalLib.LogOnServer TempServerName, strDatabase, strUserName, strPassword, App.Path

    'Provide Report file name
    If Len(strReportPath) > 0 Then
    libADACrystalLib.ReportFileName = strReportPath
    End If

    'Provide argument file path to set the parameter field values
    If Len(strArgumentFilePath) > 0 Then
    libADACrystalLib.SetParametreValues strArgumentFilePath

    'Provide argument file path to pass field values as record selection formula
    libADACrystalLib.RecSelFormula strArgumentFilePath

    'Added on 2nd June 02 by Rajendra to set parameter field values of subreports
    'Provide argument file path to set the parameter field values for the subreports
    libADACrystalLib.SetParamsubReports strArgumentFilePath
    End If

    'Added by Sarvesh for Event Viewer
    If strScreenID = "EVEVIEW" Then
    libADACrystalLib.replaceData 1, objRsRecordSet
    End If

    'Preview the report
    libADACrystalLib.PreviewReport strReportName, frmMDIDiaGuardAdmin.Width - 100, frmMDIDiaGuardAdmin.Height - 100

    'Delete the file from specified path
    If Len(strReportPath) > 0 Then
    Kill strReportPath
    End If

    If Len(strArgumentFilePath) > 0 Then
    Kill strArgumentFilePath
    End If
    Else
    Dim strFileName As String
    'Get the VB Script File to the local file
    strSQL = "SELECT ReportID, ScriptText FROM rptScriptDef WHERE ReportID = '" & strReportID & "'"
    lngResult = gobjADOLibrary.OpenRecordset(dbConnection, rsGeneral, strSQL, adOpenDynamic, adLockOptimistic)
    If rsGeneral.EOF Then Exit Sub

    'Down load the script file from the database
    If Not DownLoadFileFromDatabase(rsGeneral, rsGeneral.Fields("ScriptText"), strScriptPath) Then
    Screen.MousePointer = vbDefault
    MsgBox GetResString(20453), vbCritical '"Problem in Downloading script file from database"
    Exit Sub
    End If
    'Set the script file,report file and argument file path to be executed by WScript engine
    'strFileName = "C:\winnt\system32\wscript.exe //D """ & strScriptPath & """ """ _
    & strReportPath & """ " & """" & strArgumentFilePath & """"

    strFileName = "wscript.exe //B """ & strScriptPath & """ """ _
    & strReportPath & """ " & """" & strArgumentFilePath & """ " & """" & strPassword & """"

    Screen.MousePointer = vbDefault
    'Runs the WScript exe program and returns a Variant (Double) representing the program's task ID if successful, otherwise returns zero
    lEditorInstID = Shell(strFileName, vbMaximizedFocus)
    'Load the report processing status form to the system
    frmReportProcessingStatus.Show
    'Add list items to the loaded form
    Set lstItem = frmReportProcessingStatus.lvwListView.ListItems.ad d()
    lstItem.text = strReportName
    lstItem.Tag = strReportPath & "*" & strScriptPath & "*" & strArgumentFilePath
    lstItem.Key = "Report" & CStr(lEditorInstID)
    lstItem.SubItems(1) = lEditorInstID
    lstItem.SubItems(2) = strScreenID
    lstItem.SubItems(3) = mstrNodeName
    lstItem.SubItems(4) = 0
    End If
    End If
    Set libADACrystalLib = Nothing
    Screen.MousePointer = vbDefault
    Exit Sub
    ERRORHANDLER:
    Screen.MousePointer = vbDefault
    ErrorLog "ReportProcessing Module", Err.Description, "ReportProcessing"
    Set libADACrystalLib = Nothing
    Exit Sub
    End Sub
    Last edited by argeraju; 06-13-13 at 09:10.

  7. #7
    Join Date
    Jun 2013
    Posts
    6

    Crystal Report (8.5) is not working on win7/windows 2008 64 bit system

    strFileName = "wscript.exe //B """ & strScriptPath & """ """ _
    & strReportPath & """ " & """" & strArgumentFilePath & """ " & """" & strPassword & """"

    Screen.MousePointer = vbDefault
    'Runs the WScript exe program and returns a Variant (Double) representing the program's task ID if successful, otherwise returns zero
    lEditorInstID = Shell(strFileName, vbMaximizedFocus)
    'Load the report processing status form to the system

    frmReportProcessingStatus.Show

    frmReportProcessingStatus.Show code raised an exception
    Exception Description:



    Problem signature:
    Problem Event Name: BEX
    Application Name: wscript.exe
    Application Version: 5.8.7600.16385
    Application Timestamp: 4a5bc678
    Fault Module Name: StackHash_0a9e
    Fault Module Version: 0.0.0.0
    Fault Module Timestamp: 00000000
    Exception Offset: 0278f210
    Exception Code: c0000005
    Exception Data: 00000008
    OS Version: 6.1.7600.2.0.0.256.48
    Locale ID: 16393
    Additional Information 1: 0a9e
    Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
    Additional Information 3: 0a9e
    Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

    Read our privacy statement online:
    Windows 7 Privacy Statement - Microsoft Windows

    If the online privacy statement is not available, please read our privacy statement offline:
    C:\Windows\system32\en-US\erofflps.txt

Posting Permissions

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