473,396 Members | 2,018 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,396 software developers and data experts.

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

I'm still strugling with this error after a whole work day.
Hope someone can help me with this.

I have 2 crystal reports, both binded by datasets. But one dataset is an sql
statement and another is from a stored procedure. When I use the
crystalwebviewer with the report1(dataset from sql statement), I dont have
any problems. I see the report clearly.
But when I use the report2(dataset from stored procedure), I get the "Logon
Failure" error.
I use the following code for logoninfo.
Even if I put try-catch statements, this particular exception is not quite
caught.
I've researched a lot in google on this. Hope someone can help me find a
solution.

Thanx in advance.

SqlConnection1.Open()

SqlSelectCommand1.Parameters("@wris").Value = "SX21225004"

SqlSelectCommand1.ExecuteNonQuery()

SqlDataAdapter1.Fill(DsExecSumm1, "usp_ExecSumm_SELECT")

'Create an instance of the strongly-typed report object

crReportDocument = New execsumm()

'Create a new instance of the connectioninfo object and

'set its properties

crConnectionInfo = New ConnectionInfo()

With crConnectionInfo

..ServerName = "server"

..DatabaseName = "dname"

..UserID = "uid"

..Password = "pwd"

End With

'Get the tables collection from the report object

crDatabase = crReportDocument.Database

CrTables = crDatabase.Tables

'Apply the logon information to each table in the collection

For Each CrTable In CrTables

crtableLogoninfo = CrTable.LogOnInfo

crtableLogoninfo.ConnectionInfo = crConnectionInfo

CrTable.ApplyLogOnInfo(crtableLogoninfo)

Next
CrystalReportViewer1.ReportSource = crReportDocument

SqlConnection1.Close()


Nov 17 '05 #1
0 1560

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

Similar topics

0
by: Stijn Lambert | last post by:
Hi all, I am having some problems with Crystal Reports 9 for Visual Studio .NET ... I have a multithreaded application that prints reports in several threads (based upon incoming requests on a...
4
by: anannj | last post by:
Hi everyone, I have a Crystal Report with a subreport in a windows application, which is to be exported to the pdf file. I followed the instructions on...
0
by: cw | last post by:
Hi all, I'm trying to generate some crystal report using ASP.NET. However, i stucked on the avove error.. below is the code for web form 1: Private Sub Page_Load(ByVal sender As System.Object,...
0
by: Alixx Skevington | last post by:
OK, I am confused here, so I hope that somebody out there can help me out. I am trying to run a report allows me to choose the report and then change the logon info for it. Noiw before you say...
3
by: Lorenc | last post by:
Is anybody experiencing the following error when trying to export a crystal report to a pdf? This error happens randomly. ------------------------------------------------------------------------...
0
by: Ethorsen | last post by:
Hello, is there a way to use a crystal report version 10 with the modules that comes with framework v1.1 When i try to open the crystal, it always tell me: .F(String  ,...
0
by: Dipen | last post by:
Hello All, I am using crystal report in my application. Everything is right but i end up with the following error. Failed to open a rowset. Description: An unhandled exception occurred during...
1
by: Jim B | last post by:
Hi, Wasn't sure where to post this but here goes. I build a web app that utilizes Crystal reports that when run in my dev environment they run okay. However when published at my host it...
0
by: PerumalSamy | last post by:
Hi, the following code is what i created for crystal report.I am using ACCESS database and vb.net coding. While i running the program i am getting error as...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.