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 }
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 }