By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,364 Members | 1,272 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,364 IT Pros & Developers. It's quick & easy.

Logon Fails for the crystal reports which are using command object

P: n/a
hi all,

I have created some independent reports through crystal reports developer edition v 10 and developed a small tool in .net framework v 1.1 to view these reports through the crystal reports viewer provided by .net.

This is a stand-alone windows application and nothing to do with the server. I am using local SQL anywhere database and connection is via an ODBC DSN.

Before launching the reports I am passing the login information to the reports. The code for the login information is as follows:

TableLogOnInfo crystalTableLogin;

foreach(Table crTable in currentReport.Database.Tables)
{
crystalTableLogin = crTable.LogOnInfo;
crystalTableLogin.ConnectionInfo.ServerName = "XXX"; crystalTableLogin.ConnectionInfo.UserID= "XXX";
crystalTableLogin.ConnectionInfo.Password = "XXX"
crTable.ApplyLogOnInfo(crystalTableLogin);
}

The code works fine for all reports using Tables but not for reports using Command objects. It throws an exception stating Logon failed.

Any ideas how to resolve the issue.

Thanks in advance.

Mukesh
Jul 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.