Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Logon Failed using Crystal Report XI

I wrote a VB 6 app that has the CRViewer and calls (.rpt's). The ".rpt's" use a MS Access 2003 database. This database DOES NOT have any security in the way of passwords. This application runs on a "stand-alone" system NO SERVER IS INVOLVED.

The program and Crystal Reports work fine on my system. About a week ago, I tried to install Crystal Reports Release 2. I had a lot of problems. I deleted it and re-installed CR from my install cd's. Ever since then, I have had the following problem:

I use MS Package and Deployment system to create the "Setup and Install" package. Ever since the above problem with Release 2, when I install and run the package on a different system, when I try to access the reports, I am getting a "Logon Failed" error message. PRIOR to trying to install Release 2, I never had this error message. I have no idea what is causing the problem.

I even deleted and recreated the database--same problem exist.

I have a very small scale-down version of this app. Is there any way I can send a "zip" file to you?

Please, I have a deadline on this project. I need some serious help ASAP.

In an effort to help resolve this problem, here is code from the scaled-down version: Prior to running this code, ReportPath = App.Path and ReportName = "Report1.rpt"

This code is from my CRVIEWER form:

Private Sub Form_Activate()

Set craxreport = craxapp.OpenReport(ReportPath & "\" & ReportName)
    If ReportName = "Report1.rpt" Then
    End If

DoReport:
    DoEvents
' ==============================================================================
    Screen.MousePointer = vbHourglass
    crviewer1.Refresh
    crviewer1.Zoom "100"
    While crviewer1.IsBusy
        DoEvents
    Wend
    crviewer1.ReportSource = craxreport
    crviewer1.Refresh
    crviewer1.ViewReport
    crviewer1.Refresh
    Set craxreport = Nothing
    Screen.MousePointer = vbDefault
End Sub

Private Sub Form_Load()
Set craxapp = CreateObject("Crystalruntime.application.11")
End Sub

Private Sub Form_Resize()
Me.Height = Screen.Height
Me.Width = Screen.Width
Me.Top = 0
Me.Left = 0
crviewer1.Top = 0
crviewer1.Height = Me.ScaleHeight
crviewer1.Width = Me.ScaleWidth
frmCRPrint.Refresh
End Sub

This code is the "Connection" string:

Public ReportPath As String
Public craxapp As New CRAXDRT.Application
Public craxreport As CRAXDRT.Report
Public CRXDatabaseField As CRAXDRT.DatabaseFieldDefinition
Public ReportName As String
Public pconSports As ADODB.Connection

Public Sub OpenConnections()
Set pconSports = New ADODB.Connection
        pconSports.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Sports.mdb" & ";Persist Security Info=False"
        ReportPath = App.Path
    pconSports.Mode = adModeReadWrite
    pconSports.Open

replied

OK, a few details to go over.

You do not need all of the below references:

Crystal ActiveX Report Viewer Library 11.0

Crystal Reports ActiveX Designer Design and Runtime Library 11.0

Crystal Reports ActiveX Designer Library 11.0

Crystal Reports ActiveX Designer Run Time Library 11.0

As long as you are not using report creation APIs, you only need

Crystal ActiveX Report Viewer Library 11.0

Crystal Reports ActiveX Designer Run Time Library 11.0

Which means you'd be using the craxdrt.dll (Dim myApp as New Craxdrt.Application), and the MSM files you need would be; crystalreports11_RDC_Runtime.msm, crystalreports11_RDC_license.msm (you need to add the keycode to this) and crystalreports11_RDC_reportEngine.msm.

If you are using report creation APIs, you do not need Crystal Reports ActiveX Designer Run Time Library 11.0.

Re. creation of deployment package:

I reloaded CR XI on my Development System Build 11.0.0.895

I installed CR XI on my other PC(Test) Build 11.0.0.895

During the creation of the Install Package using MS Package and Deployment System

I do not believe the MS Package and Deployment Wizard that came with VB 6 can handle MSM files(?). To use MS files, you have to use something like MS Visual Installer, InstallShield, Wise, etc.

Ludek

Edited by: Ludek Uher on Oct 23, 2008 6:30 AM

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question