|
-
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
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
|