combit List & Label 29 - .NET Help
combit.Reporting.DataProviders Namespace / DataProviderCollection Class / DataProviderCollection Constructor
Example


In This Topic
    DataProviderCollection Constructor
    In This Topic
    Initializes a new instance of the data provider.
    Syntax
    'Declaration
     
    
    Public Function New()
    public DataProviderCollection()
    public:
    DataProviderCollection();
    Example
    DataSet ds1 = CreateDataSet();
    DataSet ds2 = CreateOtherDataSet();
    
    // combine the data from ds1 and ds2 into one datasource
    DataProviderCollection providerCollection = new DataProviderCollection();
    providerCollection.Add(new AdoDataProvider(ds1));
    providerCollection.Add(new AdoDataProvider(ds2));
    LL.DataSource = providerCollection;
    LL.Design();
    Dim ds1 As DataSet = CreateDataSet()
    Dim ds2 As DataSet = CreateOtherDataSet()
    
    ' combine the data from ds1 and ds2 into one datasource
    Dim providerCollection As New DataProviderCollection()
    providerCollection.Add(New AdoDataProvider(ds1))
    providerCollection.Add(New AdoDataProvider(ds2))
    LL.DataSource = providerCollection
    LL.Design()
    Requirements

    Platforms: Windows 10 (Version 21H2 - 23H2), Windows 11 (21H2 - 22H2), Windows Server 2016 - 2022
    .NET: .NET Framework 4.8, .NET 6, .NET 7, .NET 8

    See Also