Total of sums in mail merge directory
Hello,
I've been using an excellent tutorial provided by Doug Robbins. Thusfar I have been successful simply replacing my field names with those in the tutorial and shuffling things about to suit my formatting needs. Which, of course, means that I'm not really sure what I'm doing, but I know that it's working. The part of the tutorial that covers calculations on merge data (i.e. generating data that isn't in a field in the spreadsheet) sort of lost me because it involves working with two keys.
At this point, I have:
{QUOTE{IF{MERGESEQ}=1{SET Key""}{SET LastKey{REF Key}}}"{IF{MERGEFIELD Orgcd}<>{REF Key}"{IF{MERGESEQ}>1"{QUOTE 12}"}{SET Key{MERGEFIELD Orgcd}}"}{MERGEFIELD Title} {MERGEFIELD Paymentamt \# $,0}"}
So, for every record with the same Orgcd, a title "Title" and price "Paymentamt" are printed until the next Orgcd comes along, at which point there is a page break. I'm trying to add a total line that will sum up the Paymentamt numbers for any given set of titles.
May I ask for a pointer or two for accomplishing this?
Thanks!
Chris
|