Skip to main content
A newer version of this page is available. .

Lesson 3 - Create a Mail Merge Report

  • 3 minutes to read

This tutorial describes the steps required to create and publish a mail merge report with Snap.

The tutorial consists of the following sections.

Provide a Document Template

To provide a template for a mail merge document, do the following.

  1. Run the Snap application that was created in Lesson 1 - Create a Snap Application.
  2. Create a document layout by using the rich text editing tools of the Snap application, or open an existing document in one of the supported third-party formats.

    snap-getting-started-mail-merge01

Add Dynamic Content

To create a Snap report using a document template, do the following.

  1. Provide the document with a master-detail data connection, as described in Lesson 2 - Connect a Document to Data. This tutorial uses a connection to the sample Northwind database (the nwind.mdb file included in the product installation).
  2. Next, specify which data source will be used for mail merge. To do this, click the Data Source button on the Data Tools: Mail Merge tab of the main toolbar and select the required data source in the invoked drop-down list.

    snap-getting-started-mail-merge02

    Alternatively, right-click the required data source in the Data Explorer and select Use For Mail Merge in the invoked drop-down menu.

    snap-getting-started-mail-merge03

    Note

    We do not recommend using data sources which are not marked as Use for Mail Merge to perform mail merge.

  3. To insert data bound fields into the document, drag-and-drop data fields from the Data Explorer onto the Design Surface.

    snap-getting-started-mail-merge04

    Activate the Highlight Fields option from the View tab of the main toolbar to highlight all mail merge fields in a document. This allows you to easily distinguish between dynamic and static content.

    snap-getting-started-mail-merge05

  4. To insert a detail report part, drag-and-drop fields from a subordinate node of the data source. Fields of a nested level of a mail-merge data source are inserted into a template as columns of a Snap List.

    snap-getting-started-mail-merge06

This tutorial focuses on a very limited set of actions when using Snap. For more information on the reporting functionality supplied with Snap, see the following tutorials in the Snap Examples section.

Preview and Publish the Document

The Snap mail merge document is now ready. To view the result, click the Finish & Merge button in the Mail Merge tab of the main toolbar, and select Print Preview… in the invoked drop-down menu. In the invoked Export Range dialog, select All records and click OK.

snap-mail-merge-print-preview

The following image illustrates a print preview for the final document.

snap-getting-started-mail-merge07

See Also