Data Connectivity
 Crystal Reports Forum : Crystal Reports .NET 2003 : Data Connectivity
Message Icon Topic: SetLogOnInfo issue Post Reply Post New Topic
Author Message

Joined: 07 Nov 2016
Location: United States
Online Status: Offline
Posts: 1
Quote sliesenberg Replybullet Topic: SetLogOnInfo issue
    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)

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

This page was generated in 0.016 seconds.