Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I developed one windows application using Visual Studio 2008 with C# with Crystal Report.

SQL
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);
}
Posted
Updated 13-Mar-14 0:35am
v2
Comments
ZurdoDev 12-Mar-14 7:25am    
Login failed. Doesn't that explain the issue?
thatraja 12-Mar-14 8:57am    
Verify the connectionstring & login details

1 solution

Check the Connection string and update the connection by opening crystal report from system1 to system2 as its connecting to system1 only
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900