Use Embedded Fields (Mail Merge)

<< Click to Display Table of Contents >>

Navigation:  User Interface (UI) Elements > Report Designer > Create Reports >

Use Embedded Fields (Mail Merge)

 

Use Embedded Fields (Mail Merge)

This topic describes how to provide data to report controls using the advanced Mail Merge binding method. This feature allows you to create templates in which data source values populate specific fields while other text remains constant (that is, allows you to combine static and dynamic content within the same control).

Embed Fields in a Control Text

You can apply mail merge to the control's Text property only. Double-click the required control on the design surface to invoke the in-place editor. Insert data field names with square brackets to create embedded fields and use any prefixes or postfixes.

RDMailMerge1

You can embed a parameter's value into a control's content using the [?ParameterName] syntax.

RDMailMerge2

A database barrel icon is displayed above the control if embedded fields are valid in the current data context (specified by the report's Data Source and Data Member properties).

For the Rich Text control, you can select any text part and adjust its color and font options using the Toolbar's Font group.

RDMailMerge3

Embedded fields are replaced with values obtained from an assigned data source when previewing or exporting a report:

RDMailMerge4

Consider the following specifics and limitations when using embedded fields:

Field names should not use spaces to be interpreted correctly.

Mail Merge is not available for a table's nested fields in a master-detail hierarchy.

Embedded fields cannot be exported to XLS and XLSX as values; they are always exported as plain text. We recommend using text formats instead if you need to accompany dynamic data with static text.

Format Embedded Fields

The mail merge feature enables you to apply formats to embedded field values. Select a required data field and click the control's smart tag. Click the Format String property's ellipsis button, and in the invoked Format String Editor, choose a built-in format pattern.

RDMailMerge5

This adds the selected format to the target data field by separating it from the field name with the ! symbol and applies this format to field values when previewing a document.

RDMailMerge6

Supported Controls

You can apply the mail merge feature to the Text of the following report controls:

Barcode

Character Comb

Check Box

Label

Rich Text

Table Cell