473,386 Members | 1,841 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,386 software developers and data experts.

Crystal report with Application variables

Hello,

I would like to use crystal report .NET component. My first problem comes
when I try to specify the data source.

The server, database, userID and password are application variables. How
do I tell the report ?

Karine
Jul 21 '05 #1
3 1288
[Sorry, I don't remember which adress was set up for msdn support...]

Hello,

I would like to use crystal report .NET component. My first problem comes
when I try to specify the data source.

The server, database, userID and password are application variables. How
do I tell the report ?

Karine
Jul 21 '05 #2
Are you looking for something like this? Change the strings with the info
from the Application hash.
TableLogOnInfo logonInfo = report.Database.Tables[0].LogOnInfo;
logonInfo.ConnectionInfo.ServerName = "<server>";

logonInfo.ConnectionInfo.UserID = "<user>";

logonInfo.ConnectionInfo.Password = "<password>";

logonInfo.ConnectionInfo.DatabaseName = "<databasename>";

report.Database.Tables[0].ApplyLogOnInfo(logonInfo
"Karine Proot" <ms**@g-fit.fr> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hello,

I would like to use crystal report .NET component. My first problem comes when I try to specify the data source.

The server, database, userID and password are application variables. How do I tell the report ?

Karine

Jul 21 '05 #3
Great, this is exactly what I needed, and a good start to search further
info. Thanks.
Are you looking for something like this? Change the strings with the info
from the Application hash.
TableLogOnInfo logonInfo = report.Database.Tables[0].LogOnInfo;
logonInfo.ConnectionInfo.ServerName = "<server>";

logonInfo.ConnectionInfo.UserID = "<user>";

logonInfo.ConnectionInfo.Password = "<password>";

logonInfo.ConnectionInfo.DatabaseName = "<databasename>";

report.Database.Tables[0].ApplyLogOnInfo(logonInfo

Jul 21 '05 #4

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

Similar topics

13
by: kristoff plasun | last post by:
I have a problem with a C++ DCOM application that prints Crystal Reports with data from Oracle. The SQL query is relatively complex but when the report is printed from the Crystal Reports...
0
by: Karine Edhel Proot | last post by:
Hi all, My web application has Application variables for connection strings, as they can change often. Global.asax.cs : protected void Application_Start(Object sender, EventArgs e) {...
5
by: Henry | last post by:
I am writing a Windows forms VB.Net/MS SQL application that utilizes Crystal Reports. I want to be able to dynamically set the report data source at run time. According to article...
3
by: Karine Proot | last post by:
Hello, I would like to use crystal report .NET component. My first problem comes when I try to specify the data source. The server, database, userID and password are application variables. How...
3
by: VMI | last post by:
I know this may not be the best NG for this, but I feel you guys know more about this than any of the other NGs. I need to build several simple reports (over 50 of them and they get their data...
5
by: furby | last post by:
I'm asking this on the off chance that someone out there might have seenit before. In my current application, when the user logs in, the state variable called "role" is assigned to them,...
0
by: Linda W. | last post by:
Hi, I would appreciate any insight into the following issue.. I have an asp.net application with crystal reports being displayed.. All works fine from my IDE & I am trying to move the app to a...
0
by: John Smith | last post by:
Hello, I am developing a VB.NET 2003 application that will use lots of Crystal Reports. Sometimes the users will preview a report in a Crystal report viewer, and sometimes they will send the...
2
by: Franck | last post by:
I haven't found any crystal report groups but im sure here there is people knowing about it. How do i create variables in a report. from crystal report itself not Visual studio.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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,...

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.