GENERATE MAIL-MERGED LETTERS FROM AN AD-HOC REPORT
You can export the results of an ad-hoc report into a mail merge using a pre-prepared template. The report should contain all of the fields that you want to include in your letters and the mail merge tokens will be numbered according to the order of those fields in the report results.
Note: It is important, therefore, that you do not change the order of the fields in the Select Clause in the ad-hoc report once the template has been created.
Create Letter Template
- Launch **OpenOffice Writer **
-
Note: OpenOffice Writer defaults all documents to be in a book style format and you should amend the print settings as follows to avoid printing a blank page between each printed page.
-
Click the Tools Menu and Options.
-
Click the + symbol to the left of Open Office Writer
-
Click Print and remove the tick from Print Automatically > Inserted Blank Pages.
There is no facility to save this modification to an existing document, so click File>Save As and save the document as your new template. Open this new template to continue.
-
Type the non-variable text, ie standard text, into your letter and save the template – without closing it.
-
To add today’s date to the template:
-
place your cursor in the position that you wish to display the date, > click on the Insert menu and click Fields and then > Other;
-
click on the Documents tab and in the Type column, click > Date;
-
in the Select column, click Date ( class="underline">not Date Fixed);
-
in the Format column, scroll to the bottom, select Additional > Formats and click English (UK);
-
select your required date format and
-
Click Insert.
-
To add your field tokens to the template, click on the Database tab and then click on Mail Merge Fields.
-
Click
the + symbol to the left of the Middleman database to display
the tables in the database and then click the + symbol to the left
of AdHocMailMerge to display the tokens in the table. -
You can now add the required tokens to your template. They are numbered Col01-Col99 and these relate to the order that the data columns are displayed in your ad-hoc report, ie Col01 is the first column, etc. There are also additional tokens for Customer Ref (CustomerRef) and Animal Ref (AnimalRef) if these are not displayed.
You can either double-click on each token so that they appear one after the other in the template and re-position them later or place your cursor where you would like each token to be positioned and then double-click the token (or you can click on each token and click Insert if you prefer this to double-clicking). You can click between the template and the Field Selection screen when inserting field tokens.
- When all of the tokens have been added, click Close and Save the template in the Templates folder in same path where all of your other Assisi documents, ie consent forms, are stored. If you are not sure of the correct path, please contact Support for advice.
Run the Ad-hoc Report
- Select Reporting>Ad-hoc Reporting.
-
Click Open then browse for and double-click the required report.
-
Execute the report, the results will be displayed on the bottom half of the screen for checking.
Complete The Merge
- Click Merge on the toolbar.
-
Browse
for and select the template and click Open. -
An OpenOffice document will be created with individual pages for each record identified in the report, ready for printing and saving.
GENERATE MAIL-MERGED LABELS FROM AN AD-HOC REPORT
Create Label Template
- Launch OpenOffice Writer.
-
OpenOffice Writer defaults all documents to be in a book style format and you should amend the print settings as follows to avoid printing a blank page between each printed page.
-
Click the Tools Menu and Options.
-
Click the + symbol to the left of Open Office Writer
-
Remove the tick from Print Automatically Inserted Blank Pages.
There is no facility to save this modification to an existing document, so click File>Save As and save the document as your new template. Open this new template to continue.
- Now select New>Labels from the File menu.
The aim is to add data tokens to the Label Text box which identify the data fields to be displayed on the label.
-
Open Office remembers the data tokens from the previous template. If there is a tick in the Address tick box, remove this tick, and if there are any tokens already in the Label Text box, you can delete these if they are not relevant and add new tokens, as follows:
-
In the Database drop down box, select MiddleMan.
-
In the Table box, select AdHocMMerge.
-
In the Database Field box, will be a list of tokens that can be > added to the label template. They are numbered Col01-Col99 and > these relate to the order in which the data columns are displayed > in your ad-hoc report, ie Col01 is the first column, etc. There > are also additional tokens for Customer Ref (CustomerRef) and > Animal Ref (AnimalRef) if you need these and they are not already > displayed in the report.
-
To add your field tokens to the template, select the token in the > Database Field box; place your cursor in the Label Text > box where you would like the token to be positioned; and then > click the arrow to the left of the token name to move the token to > the Label Text box.
-
When all of the tokens have been added,
-
in the Format box click Sheet;
-
in the Brand box, select the brand of labels that you are using, > eg Avery A4;
-
In the Type box, select the label reference for the type of > labels that you are using, eg L7160 or L7161.
-
Click New Document and the new document now becomes your label template. Save this template.
Run the Ad-hoc Report
- Select Reporting>Ad-hoc Reporting.
-
Click Open then browse for and double-click the required report.
-
Execute the report, the results will be displayed on the bottom half of the screen for checking.
Complete The Merge
Click
> Merge on the toolbar.
-
Browse for and select the template and click Open.
-
The document will open ready for you to print onto your A4 labels.