Creating reports from MariaDB databases with List & Label

Learn how to easily bind report generator List & Label to MariaDB data to create comprehensive reports and other output in various formats.

What is MariaDB?

MariaDB is a free relational database system created from a fork of MySQL. It is compatible with MySQL in almost all respects and can thus be connected in the same way.

Creating reports from MariaDB data sources

List & Label can be easily bound to MariaDB data. This allows you to create comprehensive reports based on your existing MariaDB data. Relational links are also supported, allowing you to drill down or drill through your data.

How can List & Label be linked to MariaDB data sources?

Up to version 27 you can simply use the MySqlConnectionDataProvider. This is included in the assembly combit.ListLabel??.MySqlConnectionDataProvider.dll. This provider is used to provide all tables and views in the Designer. An example could look like this:

MySqlConnectionDataProvider provider = new MySqlConnectionDataProvider(connection);

using (ListLabel LL = new ListLabel())
{
    LL.DataSource = provider;
    LL.Design();
}

… which opens the designer, which is automatically populated with the collections from the specified database. From here you can then proceed with one of our Designer tutorials.

From version 28 on, there is also the MariaDBConnectionDataProvider to better support future differences in both database systems if necessary. You should - if you use MariaDB - switch to this provider from version 28 on.

A minimal sample for using the new provider would be:

using MariaDBConnectionDataProvider provider = new MariaDBConnectionDataProvider(
    $"server={address};userid={userid};password={password};database={database}")
{
    using ListLabel LL = new ListLabel();
    {
        LL.DataSource = provider;
        LL.Design();
    }
}

which gives the following result in the Designer:

If you do not want to provide all but only some tables in Designer, you can also use the DbCommandSetDataProvider to connect to MariaDB databases.

More about MariaDB and List & Label

You can also find more valuable information about using List & Label in the .NET Tutorial.

It doesn’t matter if you have a classic Windows desktop or a modern web application using ASP.NET - the List & Label data providers can be used in both worlds.

Please leave a reply to this post if you have any questions about creating reports with List & Label based on data from MariaDB databases or if you are missing information on this topic.