Hi,
Try the code below, it works from a web app using a SQL server, also take a
look at the ConnectionInfo class.
ConnectionInfo crConnectionInfo = new ConnectionInfo();
crConnectionInfo.ServerName = "127.0.0.1";
crConnectionInfo.DatabaseName = "CTP";
crConnectionInfo.UserID = "CTPWeb";
crConnectionInfo.Password = "CTPApp";
foreach (CrystalDecisions.CrystalReports.Engine.Table table in
reportDocument1.Database.Tables)
{
TableLogOnInfo crTableLogonInfo = new TableLogOnInfo();
crTableLogonInfo.TableName = table.Name;
crTableLogonInfo.ConnectionInfo = crConnectionInfo;
crTableLogonInfos.Add( crTableLogonInfo);
table.ApplyLogOnInfo( crTableLogonInfo);
}
Cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Vivek" <vi**************@solversa.com> wrote in message
news:Oi*************@TK2MSFTNGP10.phx.gbl...
Hi all,
I am working on windows base CSharp application.
I want to use Crystal reports and viewer in my project it works fine
through wizard but after deploying the application database path get changed as I
am using access...
How to set parameters of crystal report dynamically...?
Thanx In Advance
Vivek Kumbhojkar
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.726 / Virus Database: 481 - Release Date: 7/22/2004