473,511 Members | 15,011 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Display Crystal Report with database logon ingo


hi,

I'm trying to display a simple crystal report from within a web
application but I keep getting prompted to enter login details for the
database (oracle). Entering the correct information manually displays
the report perfectly but there must be a way of passing the login
details automatically?? How do I do it? There is currently no code
in the page - I simply added a Crystal Report Viewer and set the report
as required.

I'm using VS 2005 and I'd appreciate any comments or example code!

Thanks.

Feb 21 '06 #1
2 5446
Hi,

I use this code in a 2003 solution.

TableLogOnInfos crTableLogonInfos = new TableLogOnInfos();

ConnectionInfo crConnectionInfo = new ConnectionInfo();

crConnectionInfo.ServerName =
System.Configuration.ConfigurationSettings.AppSett ings["Server"];
crConnectionInfo.DatabaseName =
System.Configuration.ConfigurationSettings.AppSett ings["DataBase"] ;
crConnectionInfo.UserID =
System.Configuration.ConfigurationSettings.AppSett ings["User"] ;
crConnectionInfo.Password =
System.Configuration.ConfigurationSettings.AppSett ings["Password"] ;

foreach (CrystalDecisions.CrystalReports.Engine.Table table in
reportDocument1.Database.Tables)
{
TableLogOnInfo crTableLogonInfo = new TableLogOnInfo();
crTableLogonInfo.TableName = table.Name;
crTableLogonInfo.ConnectionInfo = crConnectionInfo;
crTableLogonInfos.Add( crTableLogonInfo);
table.ApplyLogOnInfo( crTableLogonInfo);

}
CrystalReportViewer1.LogOnInfo = crTableLogonInfos;

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

<de****@360computing.net> wrote in message
news:11*********************@g47g2000cwa.googlegro ups.com...

hi,

I'm trying to display a simple crystal report from within a web
application but I keep getting prompted to enter login details for the
database (oracle). Entering the correct information manually displays
the report perfectly but there must be a way of passing the login
details automatically?? How do I do it? There is currently no code
in the page - I simply added a Crystal Report Viewer and set the report
as required.

I'm using VS 2005 and I'd appreciate any comments or example code!

Thanks.

Feb 21 '06 #2
Hi,

You can pass in the connection details through the
ReportDocument.SetDatabaseLogon() method:

http://msdn.microsoft.com/library/de...ethodtopic.asp

Regards - Octavio
<de****@360computing.net> escribió en el mensaje
news:11*********************@g47g2000cwa.googlegro ups.com...

hi,

I'm trying to display a simple crystal report from within a web
application but I keep getting prompted to enter login details for the
database (oracle). Entering the correct information manually displays
the report perfectly but there must be a way of passing the login
details automatically?? How do I do it? There is currently no code
in the page - I simply added a Crystal Report Viewer and set the report
as required.

I'm using VS 2005 and I'd appreciate any comments or example code!

Thanks.

Feb 21 '06 #3

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

Similar topics

1
2347
by: Roger | last post by:
Hello all Haven't worked with Crystal since the VB 4 days. Now for the first time I'm trying to create a report in a .net/vb project using SQL 2000 for the Database. When I add the Crystal...
0
1506
by: Michael | last post by:
Hello, Is there a way to display Crystal Report file without depending on the Win form with CrystalReportViewer control in it, such as evoke the Crystal Report engine directly or something like...
0
1863
by: Plunaldo | last post by:
Hi All I use a ODBC Connection to Connect to a AS400 System. I created a new DSN in the Windows System. The Databaseaccess is made directly out of the Crystal Report...so the Crystal Report is...
0
1910
by: sztonix | last post by:
Hi all, I encountered a crystal report deployment problem. I make reports with Crystal Report for Visual Studio .NET 2003. It works fine in the development machine. And then make setup...
0
1569
by: Stedak | last post by:
We are trying to use untyped reports in a C# application. Since the reports are being written by a third party the connection information needs changed at runtime. It will always be a ODBC SQL...
3
1287
by: Mustufa Baig | last post by:
I would to be able to display crystal report via ASP.NET by using CrystalViewer Web Component and by exporting as well. Thanks.
1
1968
by: abc | last post by:
Our web project is used VS2003 and Crystal Reports for Visual Studio.NET. There have reports that directly call to sql server's stored procedure. I also call SetDatabaseLogon method to change user...
8
10480
by: rzaleski | last post by:
I am trying to display a Crystal Report in an application I developed. I used the following tools: Microsoft Visual Studio.NET 2005 Standard Crystal Reports 10 Professional I am using the...
0
926
by: dhoward | last post by:
I hope this is the correct forum but if not, please direct me somewhere else. When trying to retrieve my report, it asks for login credentials like server name, database name, password, and...
0
7144
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...
1
7085
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
7512
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5671
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,...
0
4741
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...
0
3214
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1577
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
449
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.