Partager via


CrystalReportViewerBase.LogOnInfo Propriété

Obtient ou définit la collection TableLogOnInfos.

Espace de noms CrystalDecisions.Web Assembly CrystalDecisions.Web (CrystalDecisions.Web.dll)

Syntaxe

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

Exemple

Cet exemple illustre la création d'un objet LogOnInfo pour la classe CrystalReportViewerBase.

    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;
    }

Informations de version

Crystal Reports Basic for Visual Studio 2008

Pris en charge depuis : Crystal Reports for Visual Studio .NET 2002

Voir aussi

Référence

CrystalReportViewerBase Classe
CrystalReportViewerBase Membres
CrystalDecisions.Web Espace de noms