Print the OEL on the First and Last piece in the container

Printing postal or non postal reports, container tags, address labels, addresses on the mailpiece, and PDF's of reports.

Moderators: Chrissy, Steve, Terry, Donna, Dave, Eric, MartyH, Kristen, Geoff, Vince

Post Reply
User avatar
Dave
Site Admin
Posts: 620
Joined: Wed Sep 20, 2006 3:20 pm

Print the OEL on the First and Last piece in the container

Post by Dave » Wed Apr 01, 2009 3:22 pm

If you would like to only print the optional endorsement line on the first and last piece in a tray or sack use the command below.

1. Presort the list as normal
2. Click LABELS from the Print Presort window.
3. In the print settings window select DISK FILE from the output drop-down option in the upper left corner of the screen.
4. Export ALL fields to an AccuZIP6 5x database.
5. Get back to the regular database and pull down File>Open Database, Open the newly created database.
6. Open the command window from the Edit>Commands option and paste the appropriate command into the command statement syntax area.
7. Click Run.
8. The Traymark_ indicator will now be in the first and last piece of the container.
9. Pull down File>Print>Labels
10. Edit the template, click the azendorse line and click "Print When"
11. In the bottom of the window you will see "print only when the expression is true" place the following expression:
!EMPTY(TRAYMARK_)
12. Close the template and save your changes

Use the code below for presorts sorted in FORWARD ORDER

Code: Select all

SET SAFETY OFF
PUBLIC com_alias
com_alias=alias()
copy to "C:\merge.dbf" for !EMPTY(traymark_) or !Empty(pkgmark_) fields sequence,traymark_,pkgmark_
USE ("C:\merge.dbf") IN 0 ALIAS "merge"
SELECT("merge")
REPLACE all sequence with PADL(TRANSFORM(VAL(sequence)-1),7,"0")

INDEX ON ALLT(UPPER(sequence)) TAG mytag
SELECT(com_alias)
REPLACE all sequence with PADL(TRANSFORM(VAL(sequence)),7,"0")
*replace all traymark_ with "" pkgmark_ with ""
REPLACE traymark_ with merge.traymark_ for SEEK(ALLT(UPPER(sequence)),"merge")
USE IN IIF(USED("merge"),SELECT("merge"),0)
SELECT(com_alias)
replace traymark_ with "**" for recno()=reccount()


Use the code below for presorts sorted in REVERSE ORDER

Code: Select all

SET SAFETY OFF
PUBLIC com_alias
com_alias=alias()
copy to "C:\merge.dbf" for !EMPTY(traymark_) or !Empty(pkgmark_) fields sequence,traymark_,pkgmark_
USE ("C:\merge.dbf") IN 0 ALIAS "merge"
SELECT("merge")
REPLACE all sequence with PADL(TRANSFORM(VAL(sequence)+1),7,"0")

INDEX ON ALLT(UPPER(sequence)) TAG mytag
SELECT(com_alias)
REPLACE all sequence with PADL(TRANSFORM(VAL(sequence)),7,"0")
*replace all traymark_ with "" pkgmark_ with ""
REPLACE traymark_ with merge.traymark_ for SEEK(ALLT(UPPER(sequence)),"merge")
USE IN IIF(USED("merge"),SELECT("merge"),0)
SELECT(com_alias)
replace traymark_ with "**" for recno()=1

Post Reply