我的问题 :
#region 解决登录错误问题
TableLogOnInfo logonInfo = new TableLogOnInfo();//
foreach( CrystalDecisions.CrystalReports.Engine.Table tb in ReportDoc.Database.Tables)
{
logonInfo = tb.LogOnInfo;
logonInfo.ConnectionInfo.ServerName = "(local)";
logonInfo.ConnectionInfo.DatabaseName = "met";//
logonInfo.ConnectionInfo.UserID = "sa";
logonInfo.ConnectionInfo.Password = "pwd";//
tb.ApplyLogOnInfo(logonInfo);
}
#endregion