In the following example, letters are being prepared to mail to the parents of each future student who has an interview booked with the Head of Campus, using the crspFutureActivityPrint stored procedure.
An activity has been created on the Activity tab of Future Student Maintenance. See Future Student Maintenance - Activity tab in the Future students manual.
In the example, the interview is booked with Sarah Adamski and her parents, as displayed on the:
Activities are selected for the mail merge based on their Activity and the Mail Request field. However, if the Mailed Date and Mailed By fields are populated with values, this means that this activity has already has been printed.
The Activity field codes are maintained in the luFutureActivity lookup table. In this example, INTBOOK has been created for interviews that have been booked. See Maintaining lookup tables in the System maintenance manual.
To create mail merge letters using a stored procedure, such as the crspFutureActivityPrint procedure:
Step 1 of the Mail Merge tab is displayed on the document window.
Step 2 of the Mail Merge tab is displayed on the document window.
Step 3 of the Mail Merge tab is displayed on the document window.
The Select Data Source window is displayed.
The Choose Data Source window is displayed.
The SQL Server Login window is displayed.
Note: This is your usual Synergetic username and password.
The Add Tables window is displayed.
The SQL window is displayed.
Note: In this example we have omitted the campus parameter.
The following dialog window may be displayed.
The Microsoft Query window is displayed with the data returned by the stored procedure.
The Mail Merge Recipients window is displayed.
Note: Ensure that you return this data as soon as possible, as the data from Microsoft Query is not available for longer than 15 minutes.
Step 4 of the Mail Merge tab is displayed on the document window.
The Insert Merge Field window is displayed.
The field is inserted in the document.
Tip: Right click and select Toggle Field Codes, to format the date, such as \@ "d/mm/yyyy".
This document can form the basis of other similar letters based on future student activities.
Last modified: 7/11/2011 1:25:16 PM
See Also Using stored procedures to retrieve Synergetic data |
© 2013 Synergetic Management Systems. Published 15 October 2013.