Hi,
I developed one windows application using Visual Studio 2008 with C# and Crystal Report.
I developed one windows application using Visual Studio 2008 with C# and Crystal Report.
This application is developed in System-1 and the crystal report is displaying in System-1.Then the same project is copied to System-2 and
while running, the following error occurs - “Logon failed please try again” How to solve this???
The following is the code,
privatevoid SetDBLogonForReport(ConnectionInfo connectionInfo)
{
TableLogOnInfos tableLogOnInfos = crystalReportViewer1.LogOnInfo;
foreach (TableLogOnInfo tableLogOnInfo in tableLogOnInfos)
{
tableLogOnInfo.ConnectionInfo = connectionInfo;
}
}
publicvoid ConfigureCrystalReports()
{
ConnectionInfo connectionInfo = newConnectionInfo();
connectionInfo.ServerName = "localhost";
connectionInfo.DatabaseName = Application.StartupPath + "\\Database\\Invoicebill.mdb";
connectionInfo.UserID = "admin";
connectionInfo.Password = "adminusam";
SetDBLogonForReport(connectionInfo);
}
Replies
Know the answer? Post it — somebody with the same question will find it here.