473,324 Members | 2,370 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Crystal Reports Logon failed

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.Tab le 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;

Jul 31 '06 #1
1 1374
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.
<ki*************@consultant.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
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.Tab le 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;

Jul 31 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bonj | last post by:
Hi I am trying to create a simple 'hello world' type web application involving a crystal report. I have basically done it the simplest possible way as described in the documentation, by adding a...
0
by: stephan | last post by:
I know that this has been beaten to death but I can't seem to resolve my issues (I have 2 of them). I have created a class that exposes a public method which returns a datatable as a datasource...
2
by: Karun Karunakaran | last post by:
Hi, I am using the Crystal Enterprise .NET assemblies to generate and display a crystal report in a webform. This report connects to an SQL server (running locally) using a specific username and...
2
by: GFro | last post by:
I am getting the following error since we upgraded from .NET Framework 1.0 to 1.1. The reports all ran fine yesterday. I get this error in all apps with reports. The apps run fine but the...
1
by: andy lim | last post by:
Hello all, I'm developing a web application using ASP.NET/VB. I have problem in viewing my CR reports. It returns following exception when I tried to view any CR report. ...
3
by: Milan Todorovic | last post by:
Hello, I need help. I have experience in ASP.NET programming, but this is my first dealing with Crystal Reports. I'm trying to make the most basic report purely for testing purposes: connect to...
1
by: John Dalberg | last post by:
Running Crystal Reports with the hotfixes and patches & VS 2003. I created a CR report on my development server which has SQL Server. The report runs fine inside Visual Studio. When I switched...
9
by: mollyf | last post by:
I have tried various suggestions that I have found searching the newsgroups and still haven't been able to figure why I keep getting the logon failed error. I created a report in Crystal (not...
3
by: Shawn H. Mesiatowsky | last post by:
I have come across lots of information regarding this, but nothing seems to work. I have created a Crystal Report that access's a SQL server backend for the data, and I want to display the report...
19
by: Michael O'Donnell | last post by:
Hi All Am having major problem with crystal reports...Have designed my report no problem, its when I try to run and display ther report that I am getting a "Login Failed" message. At first I...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.