K
kimberly.walker
Im creating a report in the .net 2003 and using sql server 2000 Ive
checked all the help topics and even the support in microsoft my
problem is I still keep getting the error Logon failed when i try to
run a report. Below is my code: Any help will be greatly
apprecated...
ConnectionInfo cnn = new ConnectionInfo();
TableLogOnInfo crTableInfo = new TableLogOnInfo();
CrystalReport1 crp = new CrystalReport1();
foreach(CrystalDecisions.CrystalReports.Engine.Table crtable in
crp.Database.Tables)
{
crTableInfo = crtable.LogOnInfo;
if (crtable.Name == "tblTroubleTickets")
{ crTableInfo.ConnectionInfo.ServerName = "FSQLNV";
crTableInfo.ConnectionInfo.DatabaseName = "JEHelp";
crTableInfo.ConnectionInfo.UserID = "walk";
crTableInfo.ConnectionInfo.Password = "98HElp!";
}
else
{
crTableInfo.ConnectionInfo.ServerName = "FSQLNV";
crTableInfo.ConnectionInfo.DatabaseName = "JEHelp";
crTableInfo.ConnectionInfo.UserID = "walk";
crTableInfo.ConnectionInfo.Password = "98HElp!";
}
crtable.ApplyLogOnInfo(crTableInfo);
if(!crtable.TestConnectivity())
Console.WriteLine(crtable.Name);
}
CrystalReportViewer1.ReportSource = crp;
checked all the help topics and even the support in microsoft my
problem is I still keep getting the error Logon failed when i try to
run a report. Below is my code: Any help will be greatly
apprecated...
ConnectionInfo cnn = new ConnectionInfo();
TableLogOnInfo crTableInfo = new TableLogOnInfo();
CrystalReport1 crp = new CrystalReport1();
foreach(CrystalDecisions.CrystalReports.Engine.Table crtable in
crp.Database.Tables)
{
crTableInfo = crtable.LogOnInfo;
if (crtable.Name == "tblTroubleTickets")
{ crTableInfo.ConnectionInfo.ServerName = "FSQLNV";
crTableInfo.ConnectionInfo.DatabaseName = "JEHelp";
crTableInfo.ConnectionInfo.UserID = "walk";
crTableInfo.ConnectionInfo.Password = "98HElp!";
}
else
{
crTableInfo.ConnectionInfo.ServerName = "FSQLNV";
crTableInfo.ConnectionInfo.DatabaseName = "JEHelp";
crTableInfo.ConnectionInfo.UserID = "walk";
crTableInfo.ConnectionInfo.Password = "98HElp!";
}
crtable.ApplyLogOnInfo(crTableInfo);
if(!crtable.TestConnectivity())
Console.WriteLine(crtable.Name);
}
CrystalReportViewer1.ReportSource = crp;