|
-
Jan 12th, 2007, 04:05 AM
#1
Thread Starter
New Member
Connection Error While Previewing Report
Dear Members,
I have designed a report using Crystal Report 10, and take front end as Visual Basic 6.0 and backend as Sql Server 2000.
At the design time of report creation using ODBC connection every thing is perfectly going on. but when attached with the Front End V.B 6.0
and executing the Application with same odbc connection ,
while previewing a report i got an error Message mentioned below:
"Logon Failed.
Details:28000:[Microsoft][ODBC Sql Server Driver][Sql Server] Login Failed For User 'abc'"
I have used ODBC DSN Connection for setting the datasource property , code is given below
Set crxApp = New CRAXDRT.Application
Set crxRepo = New CRAXDRT.Report
Dim reportPath As String
reportPath = App.path & "\reports\" & fileName
Set crxRepo = crxApp.OpenReport(reportPath)
crxRepo.DiscardSavedData
ConnectionReport = "dsn=dsnName;uid=abc;pwd=abc"
crxRepo.Database.SetDataSource (ConnectionReport)
crxRepo.RecordSelectionFormula = selectFormula
crview.RefreshEx True
'-- crview is a crystal report viewer control object
crview.Refresh
crview.ReportSource = crxRepo
'-- Error Prompts when control reaches at below mentioned line
crview.ViewReport
Please help me to overcome this problem. I will be thankful to you.
Sachin
-
Jan 12th, 2007, 04:26 AM
#2
Lively Member
Re: Connection Error While Previewing Report
Has the user been granted SQL Server permissions for the database or tables that you're trying to report on? What's your network infrastructure? We're using Windows 2003, and I've got a group created in Active Directory into which I place anyone that's going to be using my Crystal Reports. That way, as long as that AD group is set up for access to the appropriate database, and as long as the individual users are all in that group, everything should come up smelling of roses.
Wise man once said: "Don't ever get married, just find a woman you don't like and buy her a house".
According to ancient Chinese proverb, "Man with hole in pocket feels cocky all day". 
-
Jan 12th, 2007, 07:04 AM
#3
Thread Starter
New Member
Re: Connection Error While Previewing Report
Dear Sir,
I am developing a software for our client
the configuration is
visual basic 6.0 for front end design
Crystal Report 10 for reports
Sql Server 2000 as datasource on remote machine.
and administrator granted all privileges for reading
data from the database to the user.
Sachin
-
Jan 12th, 2007, 08:24 AM
#4
Re: Connection Error While Previewing Report
What method of authentication is being used? Windows or SQL Server?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|