Current location: Hot Scripts Forums » Programming Languages » ASP.NET » Logon Error in Crystal Reports .NET


Logon Error in Crystal Reports .NET

Reply
  #1 (permalink)  
Old 04-18-04, 01:12 AM
Shajee_.net Shajee_.net is offline
New Member
 
Join Date: Apr 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Logon Error in Crystal Reports .NET

Hi!

I am using crystal reports 9.1 in my asp . net application. Now when i am adding data to the report file(say CrystalReport1.rpt) by push method i.e through the crystal report designer and then exporting the file into pdf format it's working fine, the report is being saved as a pdf file into the specied location.

The other method i am using for generating the report is giving data to the report (crystalreport1.rpt) dynamically ,pull method i.e based upon certain conditions a sql query fetches data and feeds it into the report. so far so good ev'thing's working fine and CrystalReportViewer flawlesly generatess the report.

The problem arises when i am exporting this report into a pdf file. Upon hitting the Export Button an error is reported

The folowing error is shown

Code:
 
Exception Details: CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed.
 
Source Error: 
 
Line 126: report.ExportOptions.DestinationOptions = DiskOpts
Line 127: report.Refresh()
Line 128: report.Export()
Line 129:
Line 130: 'Catch ex As CrystalDecisions.CrystalReports.Engine.EngineException
 
 
 
Stack Trace: 
 
[LogOnException: Logon failed.]
.F(String , EngineExceptionErrorID 
) +506
.A(Int16 , Int32 ) +537
CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext) +469
CrystalDecisions.CrystalReports.Engine.FormatEngine.Export() +107
CrystalDecisions.CrystalReports.Engine.ReportDocument.Export() +67
HSSTimeSheet.ReportTimeSheet.Button1_Click(Object sender, EventArgs e) in C:\Hanu Software Solutions\HSSTimeSheet\ReportTimeSheet.aspx.vb:128
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
 
 
 
 
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

Last edited by digioz; 07-20-08 at 08:41 AM.
Reply With Quote
  #2 (permalink)  
Old 05-11-04, 12:09 AM
curiouschris curiouschris is offline
New Member
 
Join Date: May 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
I have just the same here, all works a treat on my development machines but run it on the target machines (it's a VB.NET desktop app) I get a 'logon failed' message when exporting either to PDF or to email - same error, same stack as above. Have checked all the privs etc., no joy though, have been bashing my head against this one for a few weeks now !

Any help much appreciated,

Chris
Reply With Quote
  #3 (permalink)  
Old 05-20-04, 02:01 AM
jonemma jonemma is offline
New Member
 
Join Date: May 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Me to - only with asp.net. On my local machine it works fine but on our Dev server I get:

CrystalDecisions.CrystalReports.Engine.LogOnExcept ion: Logon failed.

I am also head banging here!



Quote:
Originally Posted by curiouschris
I have just the same here, all works a treat on my development machines but run it on the target machines (it's a VB.NET desktop app) I get a 'logon failed' message when exporting either to PDF or to email - same error, same stack as above. Have checked all the privs etc., no joy though, have been bashing my head against this one for a few weeks now !

Any help much appreciated,

Chris
Reply With Quote
  #4 (permalink)  
Old 09-06-04, 06:44 AM
lamar lamar is offline
New Member
 
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb A Solution

We encountered the same error on .NET 1.1 using Crystal Reports runtime for .NET 1.0 (DevEnv 2002).
We fixed it by installing Crystal Reports runtime for .NET 1.1 (DevEnv 2003).
Reply With Quote
  #5 (permalink)  
Old 03-15-05, 03:24 PM
jobo jobo is offline
New Member
 
Join Date: Mar 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Question How Can I Tell?

I looked under add/remove programs for Crystal and DevEnv to see what my version was. I didn't see it listed. I'm using Visual Studio .NET 2003 with the Crystal Reports designer included with VS. How can I tell if I have this issue?

Quote:
We encountered the same error on .NET 1.1 using Crystal Reports runtime for .NET 1.0 (DevEnv 2002).
We fixed it by installing Crystal Reports runtime for .NET 1.1 (DevEnv 2003).
Thanks,
Joe
Reply With Quote
  #6 (permalink)  
Old 04-08-05, 08:08 AM
Explorer Explorer is offline
New Member
 
Join Date: Apr 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Possible solution

When I first started using Crystal Reports .NET, I encountered the same issue. I could create the report, and run it, pointing to a SQL Server on my local machine, it worked fine. When I pointed it to a different server, or, migrated my web application to a different server, I received the login failure.

In my case, this had to do with the account that Crystal reports used to access the SQL Server. It was a local machine account that has administrative rights on my local SQL Server, but not on the dev server.

What I was trying to do was to take a report that was created from a stored procedure, and pass a dataset to it. Basically, we were trying to print from an ADO.net dataset.

My workaround was to use the dataset to create an XML file. I would then use the XML file to create the Crystal Report (in CR.NET, you can use XML as a database). Because I didn't need to access a SQL Server to create the report originally, it wouldn't try to use any credentials later. I could pass it the dataset with no problems (I didn't even need the XML file).

I hope this works.

Paul Hammond
Covenant Web Design
http://www.covenantwebdesign.com
Reply With Quote
  #7 (permalink)  
Old 07-24-08, 12:34 AM
vedrajan vedrajan is offline
Newbie Coder
 
Join Date: Jun 2008
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
HTML Code:
<CR:CrystalReportViewer ID="CrystalReportViewer1" EnableDatabaseLogonPrompt="false" runat="server" AutoDataBind="true" Width ="95%" DisplayGroupTree="False" />
modify ur Crystal report viewer as above code.Reply if works.

Last edited by digioz; 07-24-08 at 12:32 PM.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 02:53 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.