473,666 Members | 2,225 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access Crystal reports from C#.NET

Hi,

I need to open a crystal report through the crystalreportfo rm viewer
in a C# project.

I used a view in the crystal report.But even when I give the logoninfo
from the code the dialog box to login to the database promts from the
application.

The coding I used is as follows.

public TableLogOnInfos AddLogOnInfo(Ta bleLogOnInfos
tableLogOnInfos ,string strViewName)
{
TableLogOnInfo logOnInfo = new TableLogOnInfo ();

// Set the connection information for the table in the report.
logOnInfo.Conne ctionInfo.Serve rName = sqlServer;
logOnInfo.Conne ctionInfo.Datab aseName = sqlDataBase;
logOnInfo.Conne ctionInfo.UserI D = sqlUserID;
logOnInfo.Conne ctionInfo.Passw ord = sqlPassword;
logOnInfo.Table Name = strViewName;

// Add the logoninfo to the logOnInfos collection.
tableLogOnInfos .Add (logOnInfo);
return tableLogOnInfos ;
}
If anybody knows whats wrong with this .Can u pls let me know.

Is it because I have assumed the view to be same as a table.??

Thx
Dilini
Nov 22 '05 #1
1 3023
sa******@flashm ail.com (Dilini Ginige) wrote in
news:17******** *************** **@posting.goog le.com:
Hi,

I need to open a crystal report through the crystalreportfo rm viewer
in a C# project.

I used a view in the crystal report.But even when I give the logoninfo
from the code the dialog box to login to the database promts from the
application.

The coding I used is as follows.

public TableLogOnInfos AddLogOnInfo(Ta bleLogOnInfos
tableLogOnInfos ,string strViewName)
{
TableLogOnInfo logOnInfo = new TableLogOnInfo ();

// Set the connection information for the table in the
report. logOnInfo.Conne ctionInfo.Serve rName = sqlServer;
logOnInfo.Conne ctionInfo.Datab aseName = sqlDataBase;
logOnInfo.Conne ctionInfo.UserI D = sqlUserID;
logOnInfo.Conne ctionInfo.Passw ord = sqlPassword;
logOnInfo.Table Name = strViewName;

// Add the logoninfo to the logOnInfos collection.
tableLogOnInfos .Add (logOnInfo);
return tableLogOnInfos ;
}
If anybody knows whats wrong with this .Can u pls let me know.

Is it because I have assumed the view to be same as a table.??

Thx
Dilini


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programmin g is an art form that fights back"
ELKNews - Get your free copy at http://www.atozedsoftware.com

Nov 22 '05 #2

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

Similar topics

11
3750
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows 2003 Server or ADO or ODBC issue, I am posting this on all of the three newsgroups. That's the setup: Windows 2003 Server with IIS and ASP.NET actiavted Access 2002 mdb file (and yes, proper rights are set on TMP paths and path,
3
6906
by: Gheaci Maschl | last post by:
Hi all! I would like to have your opinion about my problem and my proposal how to solve it: Ingredients: - BTriev database - Crystal Reports - maybe MS Access - Liinos6 (small ERP software)
3
3632
by: trustme1 | last post by:
I am wanting to be able to write reports against an ms-access database that is part of another package. I only want to report from the database. What I need is a package that will allow me to create the reports and then be able to distribute a run-time version. The client may not have Office so the package must run standalone. It could get to the Access database through an ODBC driver. Does anyone know what packages available?
7
1603
by: Dave Smithz | last post by:
Hi There, Having last developed an Access DB for a client about a year ago I have today received a specification that I need to (today ideally) give an indication of how much I would charge and what technology I would use etc. The spec. is well laid out but there are two things it does note: Remote access for employees Remote access for resellers
10
17528
by: Joriz | last post by:
Obviously im new with ms access..so my basic question is how do i run crystal reports in my ADP. I also pass parameters to cyrstal reports. Please help! thanks in advance
4
11421
by: Rich Moser | last post by:
My organization is in the midst of making a reporting tool decision. On the table are Crystal and the reporting functionality in Access. - Report distribution is not a factor - it's all local - Training time is a factor since we have to create a boatload of reports in a short time - The ability for users to modify report formats and data content is required - Cost is a factor - no one wants to spend too much money
2
1822
by: daniel | last post by:
Hi all, I'm using Crystal Reports for Visual Studio .NET 2003 against a fixed Access database with a fixed database-level password, using OLEDB. I designed the reports just fine, but I'm not finding a way to actually use them from code. Is there really no way to either embed the fixed connection info in the report or somehow get the string "Jet OLEDB:Database Password=password" into the OLEDB connection string from code? If not, my...
3
3401
by: Parasyke | last post by:
I see a lot of jobs advertized for people knowing Crystal Reports. I tried to use this platform 6 years ago and found it awkward and difficult. I find Access, using ODBC, to grab data and build reports to be an easier solution for me anyway. So what is all the fuss about Crystal Reports? Why use it, why learn it, why not tell an employer you have another way of getting him his reports than CR? Maybe I'm missing something??? Opinions...
16
6513
by: JoeW | last post by:
I'm utilizing a database that I created within MS Access within a program I've created in VB.NET. I am using the VB front end to navigate the information, but want to be able to print a report, that I've also created within MS Access. I've attempted using the Access.Application instance, but I get errors when it tries to load the database. Just wondering if anyone has any experience with this, and what I should do. Thanks for any...
0
2330
by: Mark Gold | last post by:
Hi! We have a VB application using Crystal Reports 6 that has worked successfully on hundreds of systems for over 10 years. Now, on one network, the application and access database does not close. It seems to hang on the command. When we open the application an peruse the screens without opening up a report (using crystal reports), the application and access db closes fine. But as soon as we run a report and then close the report and...
0
8443
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
8866
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8639
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7385
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...
1
6192
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4198
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...
1
2769
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 we have to send another system
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1772
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.