Crystal report with Application variables

K

Karine Proot

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
 
K

Karine Proot

[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
 
G

Gorm

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
 
K

Karine Proot

Great, this is exactly what I needed, and a good start to search further
info. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top