Print Page | Close Window

SetLogOnInfo issue

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
Printed Date: 03 Jul 2022 at 11:21am

Topic: SetLogOnInfo issue
Posted By: sliesenberg
Subject: SetLogOnInfo issue
Date Posted: 15 Nov 2016 at 11:15am
I am having trouble debugging the following issue:
We have an old VB6 (legacy system) that uses Crystal Reports Viewer 10.
For some reason when I connect and run, I get the report(s) and have no issue, but when a user connects to the SAME machine and uses the exact same connection credentials, when we test:

If crwDatabaseTable.TestConnectivity = False Then

this fails for him but not me.

Here is the actual code used:

Set mcrwReport = New CRAXDRT.Report
Set mcrwReport = mvarCRApplicationObject.OpenReport(mvarLocation & mvarFileName)
Set crwDatabase = mcrwReport.Database
Set colDatabaseTables = New Collection
For inttable = 1 To crwDatabase.Tables.Count
            colDatabaseTables.Add Item:=crwDatabase.Tables.Item(inttable)
Next inttable
Set crwDatabaseTable = colDatabaseTables(1)
'***New connection settings
With crwDatabaseTable
            .ConnectionProperties.Add ("Server"), mvarParent.ServerName
            .ConnectionProperties.Add ("Database"), mvarParent.ServerName
            .ConnectionProperties.Add ("DSN"), mvarParent.ServerName
            .ConnectionProperties.Add ("User ID"), mvarParent.User ID
            .ConnectionProperties.Add ("Password"), mvarParent.Password
' **** user ID and password are generic ID/pwd ***
Call crwDatabaseTable.SetLogOnInfo(mvarParent.ServerName, "", mvarParent.UserId, mvarParent.Password)

If crwDatabaseTable.TestConnectivity = False Then
   m_strErrors = "Log on to Server for Reports FAILED"
End If

Can someone assist?   
We both use the same machine, which means it uses the same version of Crystal. The connection is using a generic ID and pwd, so it cannot be our individual IDs.
(note we each have to sign onto the XP machine with our own IDs to run the main application, then select the report option. which comes to this code)


Print Page | Close Window