Crystal Report - logon failed

G

Guest

Hi,
I have tried everything i got on Net and even the procedure given Microsoft
article on this error, but I still couldnt get out of this Logon error. Where
am I going wrong.

My code is as follows - using ms-access
in the declarations
dim crpt As CrystalReport1
dim myTable As CrystalDecisions.CrystalReports.Engine.Table
dim myLogin As CrystalDecisions.Shared.TableLogOnInfo

In page load

crpt = New CrystalReport3

For Each myTable In crpt.Database.Tables
myLogin = myTable.LogOnInfo
myLogin.ConnectionInfo.DatabaseName = "myDB.mdb"
myLogin.ConnectionInfo.Password = "just4u"
myLogin.ConnectionInfo.UserID = "Admin"
myTable.ApplyLogOnInfo(myLogin)
Next

CrystalReportViewer1.ReportSource = crpt

When I load the page it gives the same Logon failed error..

Any help in this reagards.

Thanks in Advance.

Regards
Naveen
 
G

Guest

Hi Naveen,

I haven't use Access DB for CR, I can only give you some suggestions.

1) Use path + db_file_name for myLogin.ConnectionInfo.DatabaseName, e.g.
myLogin.ConnectionInfo.DatabaseName = "c:\crystalReport\ myDB.mdb"
2) Check ACCESS permission of access DB's path for account ASPNET

Or
Assign DataTable(s) that have the exact same schema as CR's query to CR's
data source. This can let you ignore database logon.

HTH

Elton Wang
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,705
Latest member
Stefkari24

Latest Threads

Top