473,320 Members | 1,965 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,320 software developers and data experts.

Crystal Report Failed to Logon

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.

CrystalDecisions.CrystalReports.Engine.LogOnExcept ion: Logon failed

I found many similar problem in several .NET forums, and no working
solution.

Anyone can help?

Many thanks in advance,
andy
Nov 18 '05 #1
1 2004
It appears that the only way around this MAJOR BUG (I know, they call it a
security feature) is to pre-load the data into a dataset and set it as the
reports datasource. The big problem with this is that you need a typed
Dataset in your project & a bit of extra code to connect & fill the dataset.

For example, you add a new dataset item to your project.
Then you drag the table(s) you want to have in the report from the server
explorer onto your dataset design screen. Save when finished.
Now you can create your new report based on the dataset, (or change the
location on an old one). Just look for you dataset under the Project
Data->ADO.NET Datasets entry in the connection list. Make your report as
normal.
When you have the report ready, you will need to fill an in-memory dataset
variable with the actual data from the database and assign it as the
datasource for the report. (ie, YOU handle the database, NOT Crystal Reports)
Now you just set the reportsource of the viewer as normal.
Something like the following:

SqlConnection conn = new SqlConnection("Integrated Security=SSPI;Data
Source=<mydbserver>;Initial Catalog=<mydatabase>");
SqlDataAdapter adap = new SqlDataAdapter("SELECT * FROM <sometable>", conn);
MyTypedDataSet data = new MyTypedDataSet();
adap.Fill(data);

MyReport rpt = new MyReport();
rpt.SetDataSource(data);
ReportViewer.ReportSource = rpt;

All Done!

I know the forgetting of database connection details is supposed to be a
security feature, but I find it weird that it 'forgets' the information even
when there is no information to forget. I have tried this with a few
databases (Access file, SQL Server, text file) in secure & unsecure formats
(ie, with & without passwords) on window & web forms.
My discovery is that the web forms version of the reports WILL NOT connect
to ANY database of ANY type/status/location AT ALL. Hence I call this a MAJOR
BUG.

If anyone has managed to get the Crystal Reports components working (as
intended by the documentation) in a web application (we'll try web services
later) please tell us how you did it!!!

"andy lim" wrote:
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.

CrystalDecisions.CrystalReports.Engine.LogOnExcept ion: Logon failed

I found many similar problem in several .NET forums, and no working
solution.

Anyone can help?

Many thanks in advance,
andy

Nov 18 '05 #2

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

Similar topics

0
by: Ambika Srinivasan | last post by:
Hi, I am getting the following error running a crystal report with VB.NET Exception Details: CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed. Source Error:
1
by: Bob Skutnick | last post by:
Help.... I've created an ADO.NET dataset in Visual Studio (a web project). I build the project and then try to create a Crystal Report using the dataset. When I try to use the ADO.NET dataset...
0
by: sztonix | last post by:
Hi all, I encountered a crystal report deployment problem. I make reports with Crystal Report for Visual Studio .NET 2003. It works fine in the development machine. And then make setup...
2
by: Tim Burda | last post by:
I posted this in another forum, but I'm adding it here to for more exposure.I am using Visual Studio 2003 and trying to get Crystal Reports to produce output. If you have any ideas, please let me...
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...
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...
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: bonita | last post by:
I come across the error "CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed." After I move my asp.net code from the development platform (XP professional) to the production web...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.