Hi,
I use this code in a 2003 solution.
TableLogOnInfos crTableLogonInf os = new TableLogOnInfos ();
ConnectionInfo crConnectionInf o = new ConnectionInfo( );
crConnectionInf o.ServerName =
System.Configur ation.Configura tionSettings.Ap pSettings["Server"];
crConnectionInf o.DatabaseName =
System.Configur ation.Configura tionSettings.Ap pSettings["DataBase"] ;
crConnectionInf o.UserID =
System.Configur ation.Configura tionSettings.Ap pSettings["User"] ;
crConnectionInf o.Password =
System.Configur ation.Configura tionSettings.Ap pSettings["Password"] ;
foreach (CrystalDecisio ns.CrystalRepor ts.Engine.Table table in
reportDocument1 .Database.Table s)
{
TableLogOnInfo crTableLogonInf o = new TableLogOnInfo( );
crTableLogonInf o.TableName = table.Name;
crTableLogonInf o.ConnectionInf o = crConnectionInf o;
crTableLogonInf os.Add( crTableLogonInf o);
table.ApplyLogO nInfo( crTableLogonInf o);
}
CrystalReportVi ewer1.LogOnInfo = crTableLogonInf os;
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
<de****@360comp uting.net> wrote in message
news:11******** *************@g 47g2000cwa.goog legroups.com...
hi,
I'm trying to display a simple crystal report from within a web
application but I keep getting prompted to enter login details for the
database (oracle). Entering the correct information manually displays
the report perfectly but there must be a way of passing the login
details automatically?? How do I do it? There is currently no code
in the page - I simply added a Crystal Report Viewer and set the report
as required.
I'm using VS 2005 and I'd appreciate any comments or example code!
Thanks.