473,395 Members | 1,677 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,395 software developers and data experts.

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
=========Exception 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.Load(ReportFilePath);

TableLogOnInfo logonInfo = new TableLogOnInfo();

foreach(Table table in reportClass.Database.Tables)
{

logonInfo = table.LogOnInfo;

logonInfo.ConnectionInfo.ServerName = "localhost";
logonInfo.ConnectionInfo.DatabaseName = "TestDB";
logonInfo.ConnectionInfo.UserID = "sa";
logonInfo.ConnectionInfo.Password = "pswd";
// Apply the connection information to the table.
table.ApplyLogOnInfo(logonInfo);
}

this.rptViewer.ReportSource = reportDoc;

Nov 16 '05 #1
1 4072
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
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...
4
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...
6
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...
4
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...
0
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...
1
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...
0
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...
3
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...
4
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...
4
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.