Not getting correct Totals for sorted list by Vendor

K

KKPeters

Using the logic from MS Article ID: 294686 I create a sorted list by Vendor.
Now I am trying to total charges to be at the end of the letter.

The total of the first page is wrong the first record is added in 3 time but
after that
everything is correct except for the last page there is not a total at all.

Any suggestions is appreciated
Here is my code:

{if {mergerec} = "1" {mergefield VENDOR_NAME}{set amt =0 }{set fee =25}

{set place1 {mergefield VENDOR_NAME}}

{if {place2} <> {place1} "Total: {Tot + fee\# $#,###.#0}
-----------------Page Break----------------------------------
{mergefield VENDOR_NAME}

{MERGEFIELD VENDOR} {MERGEFIELD PO} {MERGEFIELD PICKUP_CHARGE \#
$#,###.#0}{set Tot {=amt + {MERGEFIELD PICKUP_CHARGE }" "{MERGEFIELD VENDOR}
{MERGEFIELD PO} {MERGEFIELD PICKUP_CHARGE \# $#,###.#0}{set Tot {=Tot
+{MERGEFIELD PICKUP_CHARGE }}{set place2 {mergefield VENDOR_NAME}} {set amt
=0 }
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top