Setting Up a MongoDB Connection
To set up a MongoDB connection to connect a Logi JReport catalog to a MongoDB data source, follow the steps below:
- Create a catalog or open a catalog, then in the Catalog Manager, right-click the node of a data source and select New MongoDB Connection from the shortcut menu.
If you want to set up the connection in a new data source in the catalog, select any of the existing catalog data sources, select New Data Source on the Catalog Manager toolbar, then in the New Data source dialog, specify the name of the data source, select the MongoDB connection type and select OK.
The MongoDB Connection Wizard appears.
- In the MongoDB Connection Information screen, type in the host and port of the MongoDB server, and also the user ID and password to connect to the MongoDB server. Select Next.
- In the Connection Options screen, select to add a line for specifying the conditional replica set member for the MongoDB connection. If necessary, select to add a new replica set member. Select to remove a selected replica set member. Then specify the options for the connection. Select Next.
- In the Add Database screen (this screen will be displayed only when you have no right to access all the databases in the MongoDB data source), select to add a line for specifying the databases you can access in the MongoDB data source. If necessary, select to add a new database. Select to remove a selected database. Select Next.
- In the Add Schema screen, add the collection schemas that will be transformed to relational schemas into the catalog. Select Next.
- In the Add Table screen, add the required tables that are transformed from the relational schemas.
- Select Finish to confirm the transformed result and finalize the transformation process.
Note: When setting up the connection via SSL, you need to import the SSL certificate into the default JKS, and use the -D parameter to specify the system parameter in the file JRServer.bat in
<server_install_root>\server\bin (the MongoDB Java driver mongo-java-driver-3.4.0.jar is already within Logi JReport). Then add ssl=true in the Options box of the Connection Options screen of the MongoDB Connection Wizard.