Giter Site home page Giter Site logo

devexpress-examples / master-detail-mail-merge-essential-the-simplest-implementation-e3662 Goto Github PK

View Code? Open in Web Editor NEW
0.0 56.0 0.0 390 KB

.NET, WinForms, XtraRichEdit

License: Other

C# 45.53% Rich Text Format 45.94% Visual Basic .NET 8.53%
dotnet xtrarichedit winforms

master-detail-mail-merge-essential-the-simplest-implementation-e3662's Introduction

Files to look at:

Master-Detail Mail Merge essential - The simplest implementation

This example illustrates how to create the simplest Master-Detail report by combining the Mail Merge feature with the DOCVARIABLE, RichEditControl.CalculateDocumentVariable and RichEditDocumentServer Class functionality. Three RichEditControl instances are used in this example. The first and the second controls contain master (Category) and detail (Product) templates correspondingly. The third control is used to display the resultant report.

The actual report generation implementation is pretty simple. When you press the "Create Report" button, master data rows from the first control are merged into the third control via the RichEditControl.MailMerge Method call. During this process, the CalculateDocumentVariable event is raised for the third control, because the master template (in the first control) contains a DOCVARIABLE field. Detail data rows from the second control are merged into a RichEditDocumentServer instance in this event handler. Finally, this instance is assigned to the e.Value parameter.

Both master and detail templates for this example are created by using Utility for creating a Mail Merge template.

To test this example locally, setup the sample "Northwind" database in your SQL Server instance by using the instnwind.sql file, attached with this example.

See Also:
How to use the Document.CalculateDocumentVariable event to insert a formatted content via the DOCVARIABLE field with a parameter
How to create a master-detail report in a RichEditControl


master-detail-mail-merge-essential-the-simplest-implementation-e3662's People

Contributors

devexpressexamplebot avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.