473,504 Members | 13,601 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 crystalreportform 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(TableLogOnInfos
tableLogOnInfos,string strViewName)
{
TableLogOnInfo logOnInfo = new TableLogOnInfo ();

// Set the connection information for the table in the report.
logOnInfo.ConnectionInfo.ServerName = sqlServer;
logOnInfo.ConnectionInfo.DatabaseName = sqlDataBase;
logOnInfo.ConnectionInfo.UserID = sqlUserID;
logOnInfo.ConnectionInfo.Password = sqlPassword;
logOnInfo.TableName = 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 3018
sa******@flashmail.com (Dilini Ginige) wrote in
news:17*************************@posting.google.co m:
Hi,

I need to open a crystal report through the crystalreportform 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(TableLogOnInfos
tableLogOnInfos,string strViewName)
{
TableLogOnInfo logOnInfo = new TableLogOnInfo ();

// Set the connection information for the table in the
report. logOnInfo.ConnectionInfo.ServerName = sqlServer;
logOnInfo.ConnectionInfo.DatabaseName = sqlDataBase;
logOnInfo.ConnectionInfo.UserID = sqlUserID;
logOnInfo.ConnectionInfo.Password = sqlPassword;
logOnInfo.TableName = 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/
"Programming 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
3733
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...
3
6885
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
3621
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...
7
1597
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...
10
17508
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
11413
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 -...
2
1811
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...
3
3396
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...
16
6486
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,...
0
2311
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....
0
7213
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
7298
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
7366
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...
0
5610
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
4698
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
3187
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...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1526
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
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.