다음을 통해 공유


CrystalReportViewerBase.LogOnInfo 속성

TableLogOnInfos 컬렉션을 가져오거나 설정합니다.

네임스페이스 CrystalDecisions.Web 어셈블리 CrystalDecisions.Web (CrystalDecisions.Web.dll)

구문

Public Property LogOnInfo As CrystalDecisions.Shared.TableLogOnInfos
public CrystalDecisions.Shared.TableLogOnInfos LogOnInfo {get; set;}

예제

이 예에서는 CrystalReportViewerBase 클래스에 대한 LogOnInfo 개체를 만드는 방법을 보여 줍니다.

    Private Sub SetLogOnInfo(ByVal myUserID As String, ByVal myPassword As String, ByVal myDatabaseName As String, ByVal myServerName As String, ByVal myTableName As String)
      Dim myLogOnInfo As New TableLogOnInfo
      myLogOnInfo.ConnectionInfo.ServerName = myServerName
      myLogOnInfo.ConnectionInfo.DatabaseName = myDatabaseName
      myLogOnInfo.ConnectionInfo.UserID = myUserID
      myLogOnInfo.ConnectionInfo.Password = myPassword
      myLogOnInfo.TableName = myTableName
      Dim myTableLogOnInfos As New TableLogOnInfos
      myTableLogOnInfos.Add(myLogOnInfo)
      CrystalReportViewerBase.LogOnInfo = myTableLogOnInfos
    End Sub
    private void SetLogOnInfo(String userID, String password, String databaseName, String serverName, String tableName)
    {
      TableLogOnInfo logOnInfo = new TableLogOnInfo();
      logOnInfo.ConnectionInfo.ServerName = serverName;
      logOnInfo.ConnectionInfo.DatabaseName = databaseName;
      logOnInfo.ConnectionInfo.UserID = userID;
      logOnInfo.ConnectionInfo.Password = password;
      logOnInfo.TableName = tableName;
      TableLogOnInfos tableLogOnInfos = new TableLogOnInfos();
      tableLogOnInfos.Add(logOnInfo);
      crystalReportViewerBase.LogOnInfo = tableLogOnInfos;
    }

버전 정보

Crystal Reports Basic for Visual Studio 2008

Crystal Reports for Visual Studio .NET 2002 에서부터 지원됨

참고 항목

참조

CrystalReportViewerBase 클래스
CrystalReportViewerBase 멤버
CrystalDecisions.Web 네임스페이스