PC Review


Reply
Thread Tools Rate Thread

Crystal Reports Logon failed

 
 
kimberly.walker@consultant.com
Guest
Posts: n/a
 
      31st Jul 2006
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;

 
Reply With Quote
 
 
 
 
Andrew Robinson
Guest
Posts: n/a
 
      31st Jul 2006
I haven't used Crystal in a long time and have no plans on using it in the
future but have some vague memories that the server field is really the dsn
name for an ODBC entry. Not well documented and poorly implimented.


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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;
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET/Crystal Reports Logon Failed mollyf@hotmail.com Microsoft ASP .NET 9 15th Mar 2005 09:27 PM
Logon failed. Crystal Reports .NET GFro Microsoft ASP .NET 2 23rd Jul 2004 08:33 PM
Crystal reports logon failed Alpana Bajaj Microsoft C# .NET 0 27th Jan 2004 11:04 AM
Crystal reports logon failed Alpana Bajaj Microsoft C# .NET 0 27th Jan 2004 10:34 AM
Logon failed with Crystal Reports Carlo Marchesoni Microsoft ASP .NET 2 25th Aug 2003 10:29 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:43 AM.