Java
TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();
TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
Tables CrTables;
ConnectionInfo Cr = new ConnectionInfo();
Cr.ServerName = "";//here you should provide your Server Name
Cr.DatabaseName = "";//here you should provide your Database Name
Cr.UserID = "";//here you should provide your User Name
Cr.Password = "";//here you should provide your Password
CrTables = Ip.Database.Tables;
foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)
{
crtableLogoninfo = CrTable.LogOnInfo;
crtableLogoninfo.ConnectionInfo = Cr;
CrTable.ApplyLogOnInfo(crtableLogoninfo);
}
crystalReportViewer1.ReportSource = Ip;

Join the conversation! Your thoughts help the community grow.