Skip to content

Commit 9b9ae99

Browse files
author
epolevikov
committed
Add topic on how to bind a report to MongoDB instance
1 parent f2ecd88 commit 9b9ae99

10 files changed

+59
-0
lines changed

interface-elements-for-desktop/articles/report-designer/report-designer-for-winforms/bind-to-data.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ The following tutorials illustrate how to bind a report to various data sources:
1515
* [Bind a Report to an Excel Workbook](bind-to-data/bind-a-report-to-an-excel-workbook.md)
1616
* [Bind a Report to a CSV File](bind-to-data/bind-a-report-to-a-csv-file.md)
1717
* [Bind a Report to JSON Data](bind-to-data\bind-a-report-to-json-data.md)
18+
* [Bind a Report to a MongoDB Instance](bind-to-data\bind-a-report-to-a-mongodb-instance.md)
1819
* [Bind a Report to XPO Persistent Object](bind-to-data\bind-a-report-to-an-xpo-persistent-object.md)
1920
* [Bind a Report to a Join-Based Federated Data Source](bind-to-data\bind-a-report-to-a-join-based-federated-data-source.md)
2021
* [Bind a Report to a Union-Based Federated Data Source](bind-to-data\bind-a-report-to-a-union-based-federated-data-source.md)
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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+
![Invoke the Data Source Wizard](../../../../images/eurd-win-report-smart-tag-add-new-data-source.png)
15+
16+
## Select the MongoDB Data Source
17+
18+
Select **MongoDB** in the invoked **Data Source Wizard** and click *Next*.
19+
20+
![Select the MongoDB Data Source](../../../../images/data-source-wizard-select-mongodb.png)
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+
![Specify connection properties](../../../../images/data-source-wizard-specify-connection-properties.png)
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+
![Configure queries to a MongoDB instance](../../../../images/data-source-wizard-configure-queries.png)
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+
![MongoDB data source in the Field List and Report Explorer](../../../../images/field-list-report-explorer-mongodb-data-source.png)
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+
![Modify MongoDB Data Source](../../../../images/field-list-manage-mongodb-data-source.png)
49+
50+
Reconfigure the connection parameters or queries in the invoked **Connection Editor** and click *Finish*.
51+
52+
![Reconfigure MongoDB Data Source](../../../../images/field-list-reconfigure-mongodb-data-source.png)
53+
54+
Right-click the data source node and select **Rebuild Result Schema** to apply the changes.
55+
56+
![Rebuild Result Schema](../../../../images/field-list-rebuild-result-schema-mongodb-data-source.png)
15.8 KB
Loading
19.6 KB
Loading
25.5 KB
Loading
14.4 KB
Loading
14.3 KB
Loading
15.7 KB
Loading
13.5 KB
Loading

interface-elements-for-desktop/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,8 @@
511511
href: articles/report-designer/report-designer-for-winforms/bind-to-data/bind-a-report-to-a-csv-file.md
512512
- name: Bind a Report to JSON data
513513
href: articles/report-designer/report-designer-for-winforms/bind-to-data/bind-a-report-to-json-data.md
514+
- name: Bind a Report to a MongoDB Instance
515+
href: articles/report-designer/report-designer-for-winforms/bind-to-data/bind-a-report-to-a-mongodb-instance.md
514516
- name: Bind a Report to an XPO Persistent Object
515517
href: articles\report-designer\report-designer-for-winforms\bind-to-data\bind-a-report-to-an-xpo-persistent-object.md
516518
- name: Bind a Report to a Join-Based Federated Data Source

0 commit comments

Comments
 (0)