Ensuring a seamless connection between The Report Viewer (TRV) and your database is paramount. This guide offers an all-encompassing solution aimed at simplifying this process. Should you encounter any hitches along the way, do not hesitate to reach out to us for further guidance.
Understanding TRV's Compatibility with Database Drivers
TRV has the capability to interact with any database supported by a full version of Crystal Reports, all thanks to the Crystal Reports runtime redistributable. Both x86 and x64 ODBC Data Sources are compatible with TRV. However, ensure the database drivers and TRV's version installed are harmonious (either x86 or x64). For clarity's sake, we only feature x86 versions on our website, but x64 versions are available upon request.
Initiating a Connection between TRV and your Database
Before making a connection, ensure the corresponding database driver is installed. This is crucial since TRV employs Crystal Reports runtime and APIs to connect to databases. Hence, the driver will depend on the database type. Once the driver is installed, here are the steps to connect TRV:
- Setup the connection details: This includes the Hostname/IP address of the database server, port number, username, password, and any additional parameters.
- Confirm the connection by running a simple query.
- Embed these connection details in TRV settings.
- Generate the report using the real-time data from the database.
Handling Embedded Connection Settings
If the connection settings are integrated into your report, adhere to the following:
- Identify the Data Source Name (DSN) specified in the report.
- Setup a corresponding ODBC driver (32-bit or 64-bit) in line with your TRV version, using the identified DSN. Note that the DSN is case-sensitive.
- Close all active reports in TRV.
- Open TRV and choose "use embedded connections" in the connections dropdown menu.
- Refresh the report to apply these changes.
Overriding Embedded Database Connections
If it becomes necessary to override the embedded connections in your report, follow these instructions:
- Establish a corresponding ODBC driver (32-bit or 64-bit) that aligns with your TRV version. Use the same DSN that initiated the driver (DSN is case-sensitive).
- Close all active reports in TRV.
- Create a new connection in TRV, give it a nickname, and enter your username and password.
- Assign the "Server" and "Database" fields to the DSN field of the ODBC driver established earlier. These fields are case-sensitive.
- Save this connection, and choose it from the connections dropdown menu.
- Reopen your report and refresh the data.
Note: Always reopen the reports whenever you alter the connection settings, as these changes are only applied once when the report is first opened.
If any complications arise during this process, validate your ODBC driver's connection or try testing it with other software. We're here to help; simply Contact Us.