Skip to main content Link Menu Expand (external link) Document Search Copy Copied

A database defined in the data dictionary is a logical database: it defines what tables belong to the database and the structure of those tables. A physical database is the actual database on disk. The logical database doesn’t concern itself with connection information; those are issues for the physical database. For example, you may have both SQL Server and SQLite versions of the same logical database; the Northwind sample database that comes with both of these is one such set of physical databases that have the same logical database structure.

A Database object in the data dictionary contains information about a logical database. A DataSource object defines the connection information for a physical database.

Data engine plugins can be used to specify the list of data sources the user can query on. For example, your application may use a configuration file that lists the data sources and their connection settings. A data engine plugin can read the same configuration file to create the data sources the report writer can access.

A data engine plugin implements the IDataEnginePlugin interface uses the DataEnginePlugin attribute. Your plugin needs references to the HorizonReports.Api and System.ComponentModel.Composition Nuget packages.


Here’s the definition of IDataEnginePlugin:

using System;
using System.Diagnostics.Contracts;
using HorizonReports.ConnectionManagement;
namespace HorizonReports.Plugins
    /// <summary>
    /// The interface that Data Engine plugins must implement.
    /// </summary>
    public interface IDataEnginePlugin :
        /// <summary>
        /// Fills the specified collection with data sources the
        /// user can query on.
        /// </summary>
        bool GetDataSources(IDataSourceCollection dataSources);

        /// <summary>
        /// Returns the name of the current data source used for reports.
        /// </summary>
        string GetCurrentDataSource(IDataSourceCollection dataSources);

(As with all plugins that derive from IBasePlugin, it also has an Application member; see the Plugins topic for information about Application.)


The DataEnginePlugin attribute on the plugin class has the usual set of parameters all plugin attributes do; see the Plugins topic for details. Here’s an example:

    Version = "",
    ExecutionPriority = 5)]
public class SampleDataEnginePlugin :

Table of contents