473,404 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

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 3010
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
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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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
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
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
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,...

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.