You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Rich Text Editor for WinForms - Create a Master-Detail Report
8
+
# Rich Text Editor for WinForms - Use Mail Merge to Create a Master-Detail Report
9
9
10
-
This example illustrates an older approach to creating master-detail documents.
10
+
This example uses the Rich Text Editor control and its Mail Merge functionality to generate a product catalog report based on a master-detail template.
11
11
12
-
> [!IMPORTANT]
13
-
> To learn about a newer and more convenient approach to master-detail mail merge, refer to the following article: [Create a Master-Detail Report with a Detail Report Band](https://docs.devexpress.com/XtraReports/4785/create-reports/create-a-master-detail-report-with-a-detail-report-band).
12
+
This project uses a two-level **Categories-Products** data source retrieved from **nwind.xml**.
Rich Text Editor supports master-detail mail merge templates. ``TableStart:Name`` and ``TableEnd:Name`` merge fields define master and nested detail regions. Region names should match group or table names in your data source.
19
+
20
+
This example loads the template to the `RichEditControl` instance located in the **Main Template** tab.
This example uses the following APIs to specify the data source:
25
+
26
+
-[RichEditControl.CreateMailMergeOptions()](https://docs.devexpress.com/OfficeFileAPI/DevExpress.XtraRichEdit.RichEditControl.CreateMailMergeOptions) method - initializes an object with mail merge settings.
27
+
-[RichEditMailMergeOptions.DataSource](https://docs.devexpress.com/OfficeFileAPI/DevExpress.XtraRichEdit.RichEditMailMergeOptions.DataSource) - sets the data source.
28
+
-[RichEditControl.MailMerge](https://docs.devexpress.com/OfficeFileAPI/DevExpress.XtraRichEdit.RichEditControl.MailMerge.overloads) method - accepts the settings object as a parameter.
29
+
30
+
In this project, the [RichEditControl.MailMerge](https://docs.devexpress.com/OfficeFileAPI/DevExpress.XtraRichEdit.RichEditControl.MailMerge.overloads) method exports the result to the `RichEditControl` instance located in the **Result** tab.
*[How to: Create a Master-Detail Report](https://docs.devexpress.com/OfficeFileAPI/15329/word-processing-document-api/examples/mail-merge/master-detail-report)
41
+
*[Mail Merge in Rich Text Documents](https://docs.devexpress.com/WindowsForms/9330/controls-and-libraries/rich-text-editor/mail-merge)
27
42
28
43
29
44
<!-- feedback -->
30
-
## Does this example address your development requirements/objectives?
0 commit comments