vivek pazhani

vivek pazhani

  • 1.7k
  • 20
  • 23.2k

Log in Failed Error in Crystal Report

Mar 13 2014 6:48 AM
 
Hi,

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);
}