Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CR9 Logon Failed Connection Properties 1

Status
Not open for further replies.

MRWARNER

Technical User
Nov 6, 2003
20
0
0
US
Have some reports (CR 9.0) that I open in a vb6 application, the db is SQL 2000 – I am connecting with ODBC
If I run the report in crystal I have no problem, when I try to open it in Application I get this message :

Logon failed.
Details:2800:[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'michele'.

I am Michele – I wrote the report in CR8 then later updated it to CR9 – When any other user runs this through the application it always says my name, regardless of who is logged in.

I have found that it has to do with the Connection Properties but I don’t understand the solutions being offered. It says to use this code, but I don’t know where to do this.

Dim ConnectionInfo As CRAXDRT.ConnectionProperties
'Set the Connection Info to Connection Properties of the table object
Set ConnectionInfo = Report.Database.Tables(1).ConnectionProperties
'Set the ODBC DSN
ConnectionInfo.Item("DSN") = "DSNName"
'Set the database name
ConnectionInfo.Item("Database") = "Database name"
'Set the user name
ConnectionInfo.Item("User ID") = "UserName
'Set the password
ConnectionInfo.Item("Password") = "Password"

Where am I suppose to write this code? Is it just a one time thing?

The code and additional instuctions were found in the Report Designer Component 9 pdf file.
 
How are you calling the report(s) from your VB6 application?

The above code would be used to set the connection information for a report before it could retrieve data, and be viewed, exported, or printed.

-dave
 
I am not a developer, I cannot alter the VB application. This code is the suggested fix by (BO) Crystal Reports Knowledge base.
I am now guessing it is VB code and not something I can fix within CR9.
I have reset the datasource in CR9 on one of the reports and that didnt work.

Can you let me know if this has to be done by the application developer or can I do something through Crystal?

PS:The reports I am having problems with have 3 subreports on them. Not sure if that matters, reports with less than that are working fine.

Thanks for response
 
This would indeed have to be done by the developer. It's a little odd though that some reports work and some don't. Did you recently switch to SQL Server authentication instead of Window authentication?

In any case, before it can connect to a secure database (SQL Server, Oracle, etc.), the report has to have valid login info in order to access the data.

-dave
 
No recent changes and hundreds of other reports work perfectly fine.

Thanks for help.
Michele
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top