combit List & Label 29 - .NET Help
combit.Reporting Namespace / ListLabel Class / DataSource Property

In This Topic
    DataSource Property (ListLabel)
    In This Topic

    DataSource to use for the Print Method and Design Method. You can bind to any data for which a provider is available. See the combit.Reporting.DataProviders Namespace for an overview of available data providers. You may also write your own data provider and in this way bind to custom sources not covered yet. The most frequently used objects for data binding are

    Public Property DataSource As Object
    public object DataSource {get; set;}
    property Object^ DataSource {
       Object^ get();
       void set (    Object^ value);

    Please note that after calling the central data binding capabilities like the Design Method, the Print Method or the Export Method the data source that's assigned to the used List & Label object has to be reassigned/recreated before reusing the object.

    Ideally, a separate object is always used for the central main functions of List & Label DesignPrint and Export, so that a reassignment of the data source is not necessary in the event of later reuse. However, it is strongly recommended that you work with a protection job for this purpose. For more details, see Multithreading and Protection Job.

    SqlConnection conn = new SqlConnection(Properties.Settings.Default.ConnectionString);  
    SqlConnectionDataProvider provider = new SqlConnectionDataProvider(conn);  
    LL.DataSource = provider;  
    Dim conn As New SqlConnection(Properties.Settings.[Default].ConnectionString)
    Dim provider As New SqlConnectionDataProvider(conn)
    LL.DataSource = provider

    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