473,569 Members | 2,870 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ApplyLogOnInfo failed in non-typed Crystal Reports (v10)

I am having issue changing the DB logon information at the runtime
when loading non-typed Crystal Report file to .NET WinForm
application.

The error message and partial code are listed below. I checked the
connection string values and confirmed they are all correct. Based
on all the document and sample I have, I can't think of anything
missing?

Thanks in advance,
MichaelJ
=========Except ion Error Message =======
"Unhandled Exception: Log on failed.
Exception Type: CrystalDecision ....
Inner Exception:
Type: System.Runtime. InteropServices .COMException
Message: Logon failed.
Error in File C:\Docume~1\... ..\{D371789A... .}.rpt
Unable to connect: incorrect log on parameters

Stack Trace: .....
"

=========== partial codes ==========
ReportDocument reportClass = new ReportDocument( );

reportClass.Loa d(ReportFilePat h);

TableLogOnInfo logonInfo = new TableLogOnInfo( );

foreach(Table table in reportClass.Dat abase.Tables)
{

logonInfo = table.LogOnInfo ;

logonInfo.Conne ctionInfo.Serve rName = "localhost" ;
logonInfo.Conne ctionInfo.Datab aseName = "TestDB";
logonInfo.Conne ctionInfo.UserI D = "sa";
logonInfo.Conne ctionInfo.Passw ord = "pswd";
// Apply the connection information to the table.
table.ApplyLogO nInfo(logonInfo );
}

this.rptViewer. ReportSource = reportDoc;

Nov 16 '05 #1
1 4082
The the last statement of the partial codes in the question I posted
should be read like below. Sorry for the typo.

this.rptViewer. ReportSource = reportClass;

thanks
Michael

Nov 16 '05 #2

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

Similar topics

0
13040
by: Shashikant Khandelwak | last post by:
Hi ! I am trying to install oracle 9i Standard edition on a windows 2000 SP4 machine. I get through the entire installation up to running the Database Configuration Assistant. While it tries to make the database, it gets to the "Creating and starting Oracle instance" stage, and then the errors start. I get: ORA-01503: CREATE CONTROLFILE...
4
4166
by: pu | last post by:
Hi, Could any one tell me what the following messages means please? And where can I get the error messages with their descriptions? ===begin=== ODBC --call failed. blank (#110) ===end=== I get this when I try to link a table into MsAccess from a postgresql
6
2240
by: Zeeway | last post by:
hi,everybody I use dotnet 2005 and c sharp to deliever a mail to a certain mail address,but it failed with messages such as "invalid parameter,the server response: decode failed". My codes is listed belowed: try { MailMessage mailObj = new MailMessage(); mailObj.To.Add("wuhuanfa@hotmail.com"); mailObj.From = new...
4
1224
by: Rex the Strange | last post by:
Hi All, Help please! I have a formview on my page and I've created an update command of the form: "update set valuex=@valuex, valuey=@valuey where valuez=@valuez" which I can get to execute....sort of. The problem is, if it failed I want to know exactly what the database was trying to execute but all I
0
1509
by: Daniel Knöpfel | last post by:
Hello On our asp.net 2.0 website we impersonate every request to the identity of the user logged in. This works this way: 1. user logs in, providing username, password 2. user is authenticated against an active directory and the windows identity is retrieved (and stored in the session!!) 3. user is impersonated using the windows identity...
1
4679
by: kencana | last post by:
Hi all, I was wondering why I always get "failed to open stream: HTTP request failed!" error in either loading a normal or xml file. i don't understand why i can't get the whole result. the result i get is only some part of the respective url (the one i tried to load). The following is my php code to open the file: $file=...
0
2074
by: rawu | last post by:
last week , i get my db version from DB2/AIX64 8.1.10 down to DB2/AIX64 8.1.5 . After that , a application called "CalRate" has something wrong . when it tries to open a cursor , it presents a error : SQL0901N The SQL statement failed because of a non-severe error . Subsequent SQL statements can be processed . (Reason "sqlriResolveOpFunc:...
3
9437
by: rawu | last post by:
last week , i get my db version from DB2/AIX64 8.1.10 down to DB2/ AIX64 8.1.5 . After that , a application called "CalRate" has something wrong . when it tries to open a cursor , it presents a error : SQL0901N The SQL statement failed because of a non-severe error . Subsequent SQL statements can be processed . (Reason...
4
3779
by: Brett | last post by:
I have an ASP.NET 2.0 application that uses Forms Authentication. The startup page contains just a login control, and the site works well on an IIS 6 web server. I am now setting the site up on the production web server, which runs Windows 2008 Server and IIS 7. The login page comes up, but when I try to log in, I get the error, "Login...
4
21961
by: Bobby Edward | last post by:
I have an xsd dataset. I created a simple query called GetDataByUserId. I can preview the data fine! I created a very simple BLL function that calls it and returns a datatable. When I run the code I get.... ======================= Server Error in '/MyCompanyMyProject' Application.
0
7618
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7926
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7679
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6287
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5223
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3657
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.