Data Connections

Smart Report Maker supports multiple Data Connections beyond the default connection that is established during installation. The default connection links to the MySQL database used internally by Smart Report Maker for system processes, including managing permissions. This database also contains Northwind test tables for demonstration purposes. In addition to these internal uses, this database can house other tables for creating reports, charts, and KPIs. Smart Report Maker ensures that its own system tables are identifiable by assigning them a unique prefix.


Creating a New Data Connection

Only administrators have permission to create new data connections. To do this, follow these steps:

  1. Log in as an Admin.
  2. Navigate to SettingsData Connections.
  3. Click the “Add New Data Connection” button.
  4. Enter the following connection parameters:
    • Host:
      • The IP address or server name where the database resides.
      • If the database is on the same machine without containerization, use localhost or 127.0.0.1.
    • Port:
      • The default port for MySQL is 3306.
    • Username and Password:
      • Enter the credentials for database authentication.
    • Database Name:
      • Provide the name of the target database.
    • Character Set and Collation:
      • By default, Smart Report Maker uses utf8mb4 and utf8mb4_unicode_ci for optimal compatibility and performance.

Special Considerations for Docker Installations

If Smart Report Maker is installed using Docker, the way you configure the host parameter depends on where the database resides:

  • Database in a Different Container:
    • Ensure both containers (Smart Report Maker and the database) are on the same network. By default, the network is named srm_network.
    • Set the Host parameter to the name of the database container to allow the containers to communicate.
  • Database on the Host (Non-Containerized):
    • Use host.docker.internal as the Host value. This resolves to the host machine’s IP address and allows the application in Docker to connect to the host database.
  • Database in a Remote Container:
    • If the database is hosted in a different remote container, provide the container’s IP address in the Host field for proper connectivity.

Conclusion

Managing data connections in Smart Report Maker is essential for extending its capabilities beyond the default database. Whether using a local database or working with containerized environments, it’s important to configure the connection parameters correctly. Docker users must ensure that both the Smart Report Maker and the database container are properly networked to avoid connectivity issues.