這是登錄INFO方法水晶報表詢問密碼,客戶端系統
private void SetLogonInfo()
{
try
{
LogInfo.ConnectionInfo.ServerName = "ServerName";
LogInfo.ConnectionInfo.UserID = "UserID";
LogInfo.ConnectionInfo.Password = "Password";
LogInfo.ConnectionInfo.DatabaseName = "DataBase";
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
要創建報告中,我用這個代碼
crystalReportViewer1.ReportSource = null;
rptdoc = new ReportDocument();
rptdoc.Load("REPORTS\\TC.rpt");
crystalReportViewer1.SelectionFormula =selectionFormula;
crystalReportViewer1.ReportSource = rptdoc;
rptdoc.Database.Tables[0].ApplyLogOnInfo(LogInfo);
它運作良好,在服務器系統中,但如果我在使用此客戶端系統,它要求輸入用戶名和密碼。我正在使用Crystal Reports 10.此外,有時它還要求服務器系統中的用戶名密碼。如何解決這個問題?
感謝您的答覆... u能請給我提供正確的順序..? – 2012-07-26 16:39:01
請給出正確的順序 – 2016-06-09 05:55:48