NEW - Adding a total to a letter with a recurring paragraph
In version 4.6 and above you can add totals to your recurring paragraphs.
The format of this is
[AGGREGATE FUNCTION(TABLENAME.FIELDNAME):FORMAT]
Where the AGGREGATE FUNCTION is one of:
SUM, COUNT, MIN, MAX, AVG
The TABLENAME.FIELDNAME matches a field in the recurring paragraph - without the field markers <<>>
The FORMAT can be one of C, R, F
C = Currency format such as £1,234.00 (available in version 4.7 onwards works as Floating point in earlier versions)
R = Round to whole number such as 1234
F = Floating point format such as 1,234.00
For example, in your recurring paragraph you may have the receipt amount field <<trans.amount>> that you wish to total so you can write a thank you letter for multiple receipts between dates. To do this you would use:
[SUM(Trans.Amount):C]
Another useful item may be to show a count of the receipts such as:
[COUNT(Trans.Transno)]
Below the recurring paragraph we recommend you place a table with the same column formats as the recurring paragraph.
Put the headings in the main letter template:
| Date | Description | Amount |
Put the details in the recurring paragraph:
| <<trans.transDate>> | <<trans.transdesc>> | <<trans.Amount>> |
Put the totals in the main letter template:
| Total | [SUM(Trans.Amount):C] |
An example of the output would be:
| Date | Description | Amount |
| 1/4/2009 | Standing Order | 10.00 |
| 15/4/2009 | Cash from sponsored ride | 50.00 |
| 1/5/2009 | Standing Order | 10.00 |
| 1/6/2009 | Standing Order | 10.00 |
| 23/06/2009 | Tickets for Gala Dinner | 60.00 |
| Total | 140.00 |
For any other advice on using these options please contact the Donor Strategy Support Team at donorstrategy.support@iris.co.uk or on 0845 226 2544 option 2 option 1
