Skip to content

Commit 1cc392f

Browse files
authored
Merge pull request #1 from DevExpress-Examples/readme
update readme
2 parents 6409722 + 99fe558 commit 1cc392f

File tree

4 files changed

+72
-57
lines changed

4 files changed

+72
-57
lines changed
Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<PropertyGroup>
3-
<TargetFramework>net8.0-windows</TargetFramework>
4-
<OutputType>WinExe</OutputType>
5-
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
6-
<UseWindowsForms>true</UseWindowsForms>
7-
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
8-
</PropertyGroup>
9-
<ItemGroup>
10-
<Compile Remove="Pictures\**" />
11-
<EmbeddedResource Remove="Pictures\**" />
12-
<None Remove="Pictures\**" />
13-
</ItemGroup>
14-
<ItemGroup>
15-
<None Remove="Data\template-intro.rtf" />
16-
<None Remove="Data\template.docx" />
17-
</ItemGroup>
18-
<ItemGroup>
19-
<None Update="Templates\Detail.rtf">
20-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
21-
</None>
22-
<None Update="Templates\Master.rtf">
23-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
24-
</None>
25-
<None Update="Templates\Template.rtf">
26-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
27-
</None>
28-
</ItemGroup>
29-
<ItemGroup>
30-
<EmbeddedResource Include="nwind.xml">
31-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
32-
</EmbeddedResource>
33-
</ItemGroup>
34-
<ItemGroup>
35-
<PackageReference Include="DevExpress.Win.Design" Version="25.2.2" />
36-
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
37-
<PackageReference Include="DevExpress.Win.RichEdit" Version="25.2.2" />
38-
</ItemGroup>
39-
<ItemGroup>
40-
<Content Include="Data\template-intro.rtf">
41-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
42-
</Content>
43-
<Content Include="Data\template.docx">
44-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
45-
</Content>
46-
</ItemGroup>
47-
</Project>
2+
<PropertyGroup>
3+
<TargetFramework>net8.0-windows</TargetFramework>
4+
<OutputType>WinExe</OutputType>
5+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
6+
<UseWindowsForms>true</UseWindowsForms>
7+
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
8+
</PropertyGroup>
9+
<ItemGroup>
10+
<Compile Remove="Pictures\**" />
11+
<EmbeddedResource Remove="Pictures\**" />
12+
<None Remove="Pictures\**" />
13+
</ItemGroup>
14+
<ItemGroup>
15+
<None Remove="Data\template-intro.rtf" />
16+
<None Remove="Data\template.docx" />
17+
</ItemGroup>
18+
<ItemGroup>
19+
<None Update="Templates\Detail.rtf">
20+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
21+
</None>
22+
<None Update="Templates\Master.rtf">
23+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
24+
</None>
25+
<None Update="Templates\Template.rtf">
26+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
27+
</None>
28+
</ItemGroup>
29+
<ItemGroup>
30+
<EmbeddedResource Include="nwind.xml">
31+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
32+
</EmbeddedResource>
33+
</ItemGroup>
34+
<ItemGroup>
35+
<PackageReference Include="DevExpress.Win.Design" Version="25.2.2" />
36+
<PackageReference Include="DevExpress.Win.RichEdit" Version="25.2.2" />
37+
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
38+
</ItemGroup>
39+
<ItemGroup>
40+
<Content Include="Data\template-intro.rtf">
41+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
42+
</Content>
43+
<Content Include="Data\template.docx">
44+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
45+
</Content>
46+
</ItemGroup>
47+
</Project>

Readme.md

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,46 @@
55
[![](https://img.shields.io/badge/💬_Leave_Feedback-feecdd?style=flat-square)](#does-this-example-address-your-development-requirementsobjectives)
66
<!-- default badges end -->
77

8-
# 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
99

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.
1111

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**.
1413

14+
![result](./media/96c27986-26f4-4775-b794-285e373adea7.png)
1515

16-
This project uses a two-level **Categories-Products** hierarchical data source, retrieved from the **nwind.xml** file.
16+
## Implementation Details
1717

18-
![result](./media/96c27986-26f4-4775-b794-285e373adea7.png)
18+
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.
21+
22+
![winforms richedit template tab](./media/richedit-template-tab.png)
23+
24+
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.
31+
32+
33+
![winforms richedit template tab](./media/richedit-result-tab.png)
1934

2035
## Files to Review
2136

2237
* [Form1.cs](./CS/Form1.cs) (VB: [Form1.vb](./VB/Form1.vb))
2338

2439
## Documentation
2540

26-
* [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)
2742

2843

2944
<!-- feedback -->
30-
## Does this example address your development requirements/objectives?
31-
32-
[<img src="https://www.devexpress.com/support/examples/i/yes-button.svg"/>](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=winforms-richedit-create-a-master-detail-report&~~~was_helpful=yes) [<img src="https://www.devexpress.com/support/examples/i/no-button.svg"/>](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=winforms-richedit-create-a-master-detail-report&~~~was_helpful=no)
33-
45+
## Does this example address your development requirements/objectives?
46+
47+
[<img src="https://www.devexpress.com/support/examples/i/yes-button.svg"/>](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=winforms-richedit-create-a-master-detail-report&~~~was_helpful=yes) [<img src="https://www.devexpress.com/support/examples/i/no-button.svg"/>](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=winforms-richedit-create-a-master-detail-report&~~~was_helpful=no)
48+
3449
(you will be redirected to DevExpress.com to submit your response)
3550
<!-- feedback end -->

media/richedit-result-tab.png

94.5 KB
Loading

media/richedit-template-tab.png

88.3 KB
Loading

0 commit comments

Comments
 (0)