DataSources.Add Method

Adds a DataSourceRef object to the collection of data sources that are used in the report.

Namespace CrystalDecisions.Web Assembly CrystalDecisions.Web (CrystalDecisions.Web.dll)

Syntax

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

Parameters

  • dataSource
    The DataSourceRef object to be added to the collection of data sources.

Example

This example shows how to add a data source ref to a data sources.

'Declaration

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

Version Information

Crystal Reports Basic for Visual Studio 2008

Supported since: Crystal Reports for Visual Studio 2005

See Also

Reference

DataSources Class
DataSources Members
CrystalDecisions.Web Namespace