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 命名空间