Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Failed Logon in vb 2003 web site Post Reply Post New Topic
Author Message
jbeale
Newbie
Newbie
Avatar

Joined: 21 Feb 2007
Location: United States
Online Status: Offline
Posts: 2
Quote jbeale Replybullet Topic: Failed Logon in vb 2003 web site
    Posted: 21 Feb 2007 at 9:01pm

When I  connected to the Xtreme Database, it works. When I try to use my SQL Server database, I get the following error. I also get funny data in the preview.

Server Error in '/WebApplication5' Application.


Logon failed.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[LogOnException: Logon failed.]
   .I(String , EngineExceptionErrorID ) +506
   .D(Int16 , Int32 ) +537
   CrystalDecisions.CrystalReports.Engine.FormatEngine.GetPage(PageRequestContext reqContext) +539
   CrystalDecisions.ReportSource.LocalReportSourceBase.GetPage(PageRequestContext pageReqContext) +189
   CrystalDecisions.Web.ReportAgent.u(Boolean n) +164
   CrystalDecisions.Web.CrystalReportViewer.OnPreRender(EventArgs e) +108
   System.Web.UI.Control.PreRenderRecursiveInternal() +62
   System.Web.UI.Control.PreRenderRecursiveInternal() +125
   System.Web.UI.Control.PreRenderRecursiveInternal() +125
   System.Web.UI.Page.ProcessRequestMain() +1499



Edited by jbeale - 21 Feb 2007 at 9:51pm
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 21 Feb 2007 at 11:54pm
You can't use the same code for opening a MS Access database to open a SQL Server database. People read my book and in the first example I show how to open an MS Access database with Crystal Reports and it works fine. Then they try to swap out the database name for SQL Server and it crashes. The code to login in to SQL Server is more complicated. You have to set the UserId and Password properties of the ConnectionInfo class. Then add this to the table by calling the method ApplyLogonInfo().
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
jbeale
Newbie
Newbie
Avatar

Joined: 21 Feb 2007
Location: United States
Online Status: Offline
Posts: 2
Quote jbeale Replybullet Posted: 22 Feb 2007 at 10:18am
Brian thanks for the quick repsonse! I like your book, some of it is over my head. I have read chapters 13 and 17 in your book, but I am confussed.
 
I feel the Pull model will work for me, but I do not know where to enter the UserID and Password or where to put the ApplyLogonInfo().
 
Can you give me detail instructions for a simple example to connect to a MS SQL database named "dbquote", a single table named " tbCustomer" , user="jim51", password ="xyz3412". I assume the database parameters are stored in the application once they are selected and it is only the userid and password that I am missing. Not sure!
 
 
I have no problems selecting the server, database, tables and fields. In the preview mode it all looks great. I just don't know how to pass the logon info in the web application, to get past the LOGON Failed.
 
Thank you for your help. I have spent a lot of time on this and I feel I am really close!
 
 
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.