473,856 Members | 1,629 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 3033
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
3780
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
6921
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
3657
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
1614
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
17563
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
11429
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
1833
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
3417
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
6545
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
2347
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
9920
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
9764
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
11063
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
10699
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
10790
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
5762
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
5960
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4176
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3203
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.