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
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.
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
Re: Connection Error While Previewing Report
What method of authentication is being used? Windows or SQL Server?