473,671 Members | 2,121 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 5462
Hi,

I use this code in a 2003 solution.

TableLogOnInfos crTableLogonInf os = new TableLogOnInfos ();

ConnectionInfo crConnectionInf o = new ConnectionInfo( );

crConnectionInf o.ServerName =
System.Configur ation.Configura tionSettings.Ap pSettings["Server"];
crConnectionInf o.DatabaseName =
System.Configur ation.Configura tionSettings.Ap pSettings["DataBase"] ;
crConnectionInf o.UserID =
System.Configur ation.Configura tionSettings.Ap pSettings["User"] ;
crConnectionInf o.Password =
System.Configur ation.Configura tionSettings.Ap pSettings["Password"] ;

foreach (CrystalDecisio ns.CrystalRepor ts.Engine.Table table in
reportDocument1 .Database.Table s)
{
TableLogOnInfo crTableLogonInf o = new TableLogOnInfo( );
crTableLogonInf o.TableName = table.Name;
crTableLogonInf o.ConnectionInf o = crConnectionInf o;
crTableLogonInf os.Add( crTableLogonInf o);
table.ApplyLogO nInfo( crTableLogonInf o);

}
CrystalReportVi ewer1.LogOnInfo = crTableLogonInf os;

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

<de****@360comp uting.net> wrote in message
news:11******** *************@g 47g2000cwa.goog legroups.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. SetDatabaseLogo n() method:

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

Regards - Octavio
<de****@360comp uting.net> escribió en el mensaje
news:11******** *************@g 47g2000cwa.goog legroups.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
2364
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 report to my project and right click, go to database, then select Add/Remove Database, I get "no items found" in my ADO.NET Datasets. I have the Data connection established, I can view it in my server explorer. I can access the data with everything...
0
1531
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 that? I am trying to find way to avoid creating Form for each report(out of a couple of hundreds reports). What is the best practice of solving this? Has someone done this
0
1870
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 bound to the DSN i made in my Windowssystem. My Question is...How can i make a deploymentpackage and deploy my stuff on a customer machine with a diffrent DSN...can i specify the DSN somewhere outside Crystal Report to change it to a new one? or do i...
0
1928
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 package. Installed on a windows server 2003 system (without visual studio .net 2003), the report gives error about "Logon Failed". The data source is specified to OLE DB SQL Server, and the LogOnInfo is specified by
0
1587
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 server database. I tried using a function from Chapter17 of Brian Bischof's book "Crystal Reports .NET Programming", however it does not work. What am I missing? private void LogonToDatabase(CrystalDecisions.CrystalReports.Engine.ReportDocument...
3
1291
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
1980
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 id and password. But I found the crystal reports use ASPNET account to logon SQL Server, not my expected user id. Our SQL Server is MSDE and run on mixed authenitcation mode.
8
10492
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 Crystal ActiveX Report Viewer Control 10.0 to display the report. It displays fine on my computer, but does not work on the client computer. I have copied the following dlls to the client computer:
0
935
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 username. Thing is the web application is on one server while the information is being pulled from a different server, which I'm quite sure is the problem. But I don't know how to get around it. I've seen the code to set up that information...
0
8476
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8393
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8820
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8598
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
7433
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4224
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1809
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.