ActiveReports 19 .NET Edition
Report Authors / Report Wizard / Configuring Data Source / Database Data Source
In This Topic
    Database Data Source
    In This Topic

    If you selected one of the MS SQL Server, MySQL, PostgreSQL, or SQLite data sources, the next screen of the report wizard allows you to configure the actual connection. The following sections describe the connection settings for each database.

    Fixed and Dynamic Settings

    Connection settings can either be fixed or dynamic:

    To make a setting dynamic, click the Parameter... link near the setting name:

    Configure Database Data Source Connection 

    This will open the Parameters dialog:

    Configure Parameter for Database Data Source Connection 

    Here, you can re-use an existing parameter or create a new one by clicking the Add button. The following properties can be configured:

    Advantages of Dynamic Settings

    Dynamic settings offer flexibility, especially in environments where connection details might change or where different users require different settings. For example, in multi-user applications, parameters can adapt to the current user's credentials or preferences, ensuring the correct data is accessed.

    Using Connection String from the Configuration

    When you invoke the Report Wizard in Visual Studio to add a new report to an existing project, you have the option to select a pre-configured connection string from the app.config or web.config file. This is particularly useful because it allows the ActiveReports.NET engine to read and use the specified connection string directly from the configuration file when the report runs.

    Selecting a Pre-configured Connection String

    In the Report Wizard, after selecting your data source (e.g., MS SQL Server), you'll see an option to use a connection string from the configuration file.

    Select Connection String from Config File 

    The UI will present a dropdown list of available connection strings saved in your app.config or web.config file.

    The ActiveReports.NET engine will use the selected connection string when the report is executed, ensuring that the connection is made using the details stored in the configuration file.

    Manual Configuration Option

    If you prefer not to use a pre-configured connection string, you can choose to manually specify the connection string and configure the settings by hand, as described below.

    Note on Standalone Report Designer

    If you are working with the Standalone Report Designer application, please note that the option to select the connection string from the configuration file is not available.

    Configuring MS SQL Server Connection

    Configure MS SQL Server Connection

    General Settings

    Authentication Settings

    Advanced Settings

    Click the Advanced... button to configure additional options such as connection timeout, network protocol, etc. All advanced settings can also be made dynamic using parameters.

    Configure Advanced Settings for MS SQL Server Connection

    Test Connection

    After entering the necessary details, click the Test Connection button to verify that the connection to the SQL Server is successful.

    Once the connection is confirmed, click Next > to proceed to the Configure MS SQL Server Queries step of the report wizard.

    Configuring MySQL Server Connection

    Configure MySQL Server Connection 

    General Settings

    Authentication Settings

    Advanced Settings

    Click the Advanced... button to configure additional options such as SSL settings or connection timeout. Just like with the other settings, all advanced options can be made dynamic by using parameters.

    Configure Advanced Settings for MySQL Server Connection

    Test Connection

    After filling in the necessary details, click the Test Connection button to ensure that the connection to the MySQL server is successful.

    Once you've confirmed that the connection is working, click Next > to proceed to the Configure MySQL Server Queries step of the report wizard.

    Configuring PostgreSQL Server Connection

    Configure PostgreSQL Server Connection 

    General Settings

    Authentication Settings

    Advanced Settings

    Click the Advanced... button to configure additional options such as SSL settings, connection timeout, or other advanced PostgreSQL-specific options. These settings can also be made dynamic by using parameters.

    Configure Advanced Settings for PostgreSQL Server Connection 

    Test Connection

    After filling in the necessary details, click the Test Connection button to ensure that the connection to the PostgreSQL server is successful.

    Once you've confirmed that the connection is working, click Next > to proceed to the Configure Postgres Server Queries step of the report wizard.

    Configuring SQLite Connection

    Configure SQLite Connection 

    General Settings

    Advanced Settings

    Click the Advanced... button to configure additional options such as connection timeout, cache size, or other SQLite-specific settings. These settings can also be made dynamic by using parameters.

    Configure Advanced Settings for SQLite Connection 

    Test Connection

    After entering the necessary details, click the Test Connection button to ensure that the connection to the SQLite database file is successful.

    Once you've confirmed that the connection is working, click Next > to proceed to the Configure SQLite Queries step of the report wizard.