cancel
Showing results for 
Search instead for 
Did you mean: 

Logon Failed using Crystal Report XI

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Ludek:

I did a search on my setup package. The one developed using MS Package and Deployment System. There were NO ".msm" files found.

As far as the Crystal Report References used in the application, they are:

- 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

Here is some other informtion that may help:

- 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 got a missing file notice "u2dpost.dll. I also got a notice that "craxdui.dll" located in "C:\Program Files\Common Files\Business Objects\3.0\bin"-dependency information could not be found.

- As I mentioned, I installed CR XI and VB 6 (SP6) on my other PC. I copied the VB Project, the .mdb and the .rpt's to that PC. When I execute the program by using these files, everything including the Reports work fine. When I execute the program (the one used by the Install Package, that's when I get the "Logon Failed" error message.

Thanks,

Sam

former_member183750
Active Contributor
0 Kudos

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

Answers (5)

Answers (5)

Former Member
0 Kudos

Ludek:

Your suggestions corrected the problem.

Thank you sooooooo much for all your help.

Sam

former_member183750
Active Contributor
0 Kudos

Excellent. Have a great weekend!

Ludek

Former Member
0 Kudos

Ludek:

I received notice you sent a message (11:47 am EST). No mesage came through.

Sam

former_member183750
Active Contributor
0 Kudos

Strange. Never did send one...

Anyhow, re. runtime. I am more interested in the actual Crystal Reports msm files that you included in your setup project. Also, let me know what CR references you have included in your project.

Ludek

Former Member
0 Kudos

I have use 2 different "Set-up-Packackage routines". I tried MS Package and Deployment and Inno Setup including InnoScrpt.

Both of these products gave me the same results.

Former Member
0 Kudos

On the developement PC, I have no problem with the report. I can run it by starting the CRXI application, open the report and then "Preview".

The report also works on the developement PC when I execute the VB6 application and use the code as specified above in my original post.

I did try to install CR XI on another PC. When I start CR application, click on FILE/NEW/BLANK REPORT, I am getting an error message "Failed to Create the Crystal Database Connector". I am going to try and re-install it.

Thanks,

Sam

former_member183750
Active Contributor
0 Kudos

How are you installing the CR runtime on those computers?

Ludek

former_member183750
Active Contributor
0 Kudos

The first place to start is in the Crystal Reports Designer. Can you run the report in the designer without any errors?

Ludek