Table.ApplyLogOnInfo 방법
Table.LogOnInfo 속성을 통해 반환된 TableLogOnInfo 개체의 변경 내용을 업데이트해야 합니다.
[Visual Basic]
Public Overrideable Sub ApplyLogOnInfo( _
ByVal value As CrystalDecisions.Shared.TableLogOnInfo _
)
[C#]
public virtual void ApplyLogOnInfo(
CrystalDecisions.Shared.TableLogOnInfo value
);
매개 변수
- value
로그온 정보를 포함합니다.
예제
다음 예제는 보고서에 대한 연결 정보를 설정하여 보고서에 적용합니다.
[Visual Basic]
Private Sub LogonToReport _
(ByVal server As String, ByVal database As String, _
ByVal ID As String, ByVal password As String)
Dim logonInfo As New TableLogOnInfo()
Dim table As Table
For Each table In Report.Database.Tables
logonInfo = Table.LogOnInfo
logonInfo.ConnectionInfo.ServerName = server
logonInfo.ConnectionInfo.DatabaseName = database
logonInfo.ConnectionInfo.UserID = ID
logonInfo.ConnectionInfo.Password = password
Table.ApplyLogOnInfo(logonInfo)
Next table
End Sub
[C#]
private void LogonToReport(string server, string database,
string ID, string password)
{
TableLogOnInfo logonInfo = new TableLogOnInfo();
foreach(Table table in Report.Database.Tables)
{
logonInfo = table.LogOnInfo;
logonInfo.ConnectionInfo.ServerName = server;
logonInfo.ConnectionInfo.DatabaseName = database;
logonInfo.ConnectionInfo.UserID = ID;
logonInfo.ConnectionInfo.Password = password;
table.ApplyLogOnInfo(logonInfo);
}
}
요구 사항
네임스페이스 CrystalDecisions.CrystalReports.Engine
어셈블리 CrystalDecisions.CrystalReports.Engine (CrystalDecisions.CrystalReports.Engine.dll)
참고 항목
Table 클래스 | Table 멤버 | CrystalDecisions.CrystalReports.Engine 네임스페이스
©2005 Business Objects SA All rights reserved.
Business Objects SA http://www.businessobjects.com/ 지원 서비스 http://korea.businessobjects.com/services/ |