DataSources.Add 方法

DataSourceRef 对象添加到报表中使用的数据源的集合。

命名空间 CrystalDecisions.Web 程序集 CrystalDecisions.Web (CrystalDecisions.Web.dll)

语法

声明
Public Overrideable Sub Add ( _
    ByVal dataSource As CrystalDecisions.Web.DataSourceRef _    
) 
public virtual void Add (
    CrystalDecisions.Web.DataSourceRef dataSource
)

参数

  • dataSource
    要添加到数据源的集合的 DataSourceRef 对象。

示例

此示例显示如何向数据源中添加数据源引用。

声明

    Private Function AddDataSourceRef(ByVal myDataSources As DataSources, _
            ByVal myDataSourceRef As DataSourceRef) As DataSources
        myDataSources.Add(myDataSourceRef)
        AddDataSourceRef = myDataSources
    End Function
    private DataSources AddDataSourceRef(DataSources dataSources, DataSourceRef dataSourceRef)
    {
        dataSources.Add(dataSourceRef);
        return dataSources;
    }

版本信息

Crystal Reports Basic for Visual Studio 2008

从此版本开始支持: Crystal Reports for Visual Studio 2005

另请参见

引用

DataSources 类
DataSources 成员
CrystalDecisions.Web 命名空间