Rtf Mail Merge Editor
About Rtf Mail Merge Editor
The Mail Merge Editor enables the fast design of Report Templates. The editor consists of two main parts:
-the Template tab enables the definition of the Report Template.
-the Preview tab permits the report visualization with the current Report Template.
Editing the Report Template
The Report Template document is composed of rich text and Merge Sections. The rich text can be edited using the standard editing toolbar. The Merge Sections are parts of the document that will be replaced during the building of the report with data from the data source. The data sources of a report are collections of objects loaded from the database.
Additionally, the print layout of the report can be set by clicking the Page Setup button in the toolbar. These settings will be persisted in the Report Template and will be used in future printings of the report. A quick print preview of the first page of the Report Template, can be seen in the Page Layout panel.
Inserting a new Collection Section to the Report Template
- Click Insert->Collection button in the toolbar. The Collection Editor window will open.
- In the Name tab set the name of the Collection.
- In the Source tab select one of the sources from the list.
- In the Columns select one or more columns ( to select more columns keep pressed the SHIFT or CTRL key ).
- In the Filter and Sort tab specify the final parameters of SubCollection:
- The Filter specifies the filtering for database loading. The format of Filter is special SQL Path format. Examples of filters:
Path["FirstName"] ='Nancy' and Path["LastName"] ='Davolio' to filter the rows that have the specified FirstName and LastName values, or
Path["FirstName"] LIKE 'a%' to filter the rows that have the FirstName column value, starting with the letter 'a'.
- The Sort specifies the order of the rows. The format of criteria is special SQL Path format. Examples of sorts:
Path["FirstName"] to sort the rows by FirstName values, or
Path["FirstName"], Path["LastName"] to sort the rows by FirstName and LastName values.
- The Load Blobs specifies if blobs should be loaded or not.
- The Load Level specifies the level of parent tables to be loaded in one shot.
- Click the OK button
You will notice that in the rich text document a Merge Section was inserted. Also a collection definition was attached to the Report Template. It can be seen in the Collection Manager , by clicking the Collections button in the toolbar.
Inserting a SubCollection Section to an existing Collection Section
SubCollections are data sources that are additionally filtered on fields the current object in the parent collection.
- Click Insert->SubCollection button in the toolbar. The Collection Editor window will open.
- In the Name tab set the name of the SubCollection.
- In the Source tab select one of the sources from the list.
- In the Columns select one or more columns ( to select more columns keep pressed the SHIFT or CTRL key ).
- In the Filter and Sort tab specify the final parameters of SubCollection:
- The Filter specifies the filtering for database loading. The format of Filter is special SQL Path format. Examples of filters:
Path["FirstName"] ='Nancy' and Path["LastName"] ='Davolio'��� to filter the rows that have the specified FirstName and LastName values, or
Path["FirstName"] LIKE 'a%'��� to filter the rows that have the FirstName column value, starting with the letter 'a'.
- The Sort specifies the order of the rows. The format of criteria is special SQL Path format. Examples of sorts:
Path["FirstName"] to sort the rows by FirstName values, or
Path["FirstName"], Path["LastName"] to sort the rows by FirstName and LastName values.
- The Load Blobs specifies if blobs should be loaded or not.
- The Load Level specifies the level of parent tables to be loaded in one shot.
- In the SubCollection Relation type the relation between the container Collection and the SubCollection, in SQL Path format.
- Click the OK button
Inserting a GroupBy Section to an existing Collection Section
A GroupBy Section is a method of groupping together obiects of a Collection, based on identic field values of the objects. The GroupBy Section can contain any rich text or merge fields from the Collection.
- Click Insert->Grouping button in the toolbar. The Collection Editor window will open.
- Select the field on wich the objects will be grouped by. Note, that in order to obtain the desired results, the sorting of the Collection on the grouping field might be necessary.
Managing the Collections of the Report Template
Click the Collections button in the toolbar. The Collection Manager window will open. It allow to:
- Add a new collection, by clicking the Add button in the toolbar.
- Edit an existing collection, by cliking the Edit button in the toolbar.
- Remove an existing collection, by cliking the Remove button in the toolbar. Note that removing a collection, any related Merge Section will not be merged during the building of the report.
Other Report Template elements
Footer is a Merge Section contained in a Collection Section, that is displayed after the last line of the collection.
Merge Field is the part of the Merge Section that will be replaced with the value from the object that corresponds to the Merge Fields name.
Counter is the part of the Merge Section that will be replaced with the index number of the current object in the Collection.
Today will be replaced with the text of the today date.
Now will be replaced with the text of the current time.
More details about Merge Sections in Report Template Syntax