Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Crystal Report Failed to Logon

Reply
Thread Tools

Crystal Report Failed to Logon

 
 
andy lim
Guest
Posts: n/a
 
      11-01-2004
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


 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2FyeSBL?=
Guest
Posts: n/a
 
      11-15-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
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Crystal Report Logon Failed Andy Lim ASP .Net 0 12-10-2004 03:11 PM
Re: "Logon failed" for Crystal Report =?Utf-8?B?S2FydW4gS2FydW5ha2FyYW4=?= ASP .Net 0 02-25-2004 06:11 PM
Crystal report logon failed problem alpanabajaj@yahoo.com ASP .Net 0 01-27-2004 09:57 AM
Crystal report logon failed problem alpanabajaj@yahoo.com ASP .Net 0 01-27-2004 09:56 AM
Logon Failed for Crystal .NET Report in ASP.Net =?Utf-8?B?Umljaw==?= ASP .Net 0 11-26-2003 02:11 PM



Advertisments