|
| 1 | +--- |
| 2 | +title: Bind a Report to a MongoDB Instance |
| 3 | +author: Eugene Polevikov |
| 4 | +--- |
| 5 | + |
| 6 | +# Bind a Report to a MongoDB Instance |
| 7 | + |
| 8 | +[Create a new project](../add-new-reports.md) and add a blank report to this project. Follow the steps below to bind the report to a MongoDB instance. |
| 9 | + |
| 10 | +## Invoke the Data Source Wizard |
| 11 | + |
| 12 | +Click the report's smart tag, expand the drop-down menu for the **Data Source** property in the "Report Tasks" list, and click **Add Report Data Source**. |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | +## Select the MongoDB Data Source |
| 17 | + |
| 18 | +Select **MongoDB** in the invoked **Data Source Wizard** and click *Next*. |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | +## Specify Connection Properties |
| 23 | + |
| 24 | +Paste the entire string or enter connection fields individually. Refer to the following topic for information on connection string format and options: [Connection String URI Format](https://docs.mongodb.com/manual/reference/connection-string/). |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | +## Specify Data Queries |
| 29 | + |
| 30 | +On the next page, choose database collections that you want to load from the MongoDB instance. Specify the name of the database and database collection in the **Database** and **Collection** columns. You can use the **Filter** column to specify filter conditions for items of the database collections. |
| 31 | + |
| 32 | +The names of queries to database collections should be unique. A string stored in a query's **Collection** column is the default name for this query. To create several queries to the same database collection, use the **Alias** column to specify different names for these queries. |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | +## Use the Created MongoDB Data Source |
| 37 | + |
| 38 | +The created data source appears in the [Field List](../report-designer-tools/ui-panels/field-list.md) and [Report Explorer](../report-designer-tools/ui-panels/report-explorer.md). |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | +You can bind report controls to the fields from this data source. Refer to the following topic for more information: [Bind Report Controls to Data](../use-report-elements/bind-controls-to-data.md) |
| 43 | + |
| 44 | +## Modify the Created MongoDB Data Source |
| 45 | + |
| 46 | +You can change connection parameters and modify queries for the created data source. Right-click the data source node in the **Field List** or **Report Explorer** and select **Configure Connections** or **Manage Queries**. |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | +Reconfigure the connection parameters or queries in the invoked **Connection Editor** and click *Finish*. |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | +Right-click the data source node and select **Rebuild Result Schema** to apply the changes. |
| 55 | + |
| 56 | + |
0 commit comments