home *** CD-ROM | disk | FTP | other *** search
- ***************************************************************************
- ** DONLABEL.PRG
- ** (C) Copyright 1990, Sub Rosa Publishing Inc.
- ** A demonstration program provided to VP-Info users.
- ** This program may be copied freely. If it is used in commercial code,
- ** please credit the source, Sub Rosa Publishing Inc.
- **
- ** DONLABEL is a subroutine on MENU.PRG, used to print 3-across labels
- ** of the list of donors or solicitors. Called by MENU.PRG twice...once
- ** each with DONOR.DBF and SOLICIT.DBF. This works because both files
- ** have same names for all fields used by subroutine.
- **
- ** DONLABEL is compatible with all current versions of VP-Info.
- **
- ** Sid Bursten and Bernie Melman
- ** May 9,1990
- ***************************************************************************
- WINDOW
- ERASE
- INDEX on ZIP+!(NAME) to xlabel ;post office wants letters in zip-code order
- CLS
- SET print on
- SET width to 130
- GOTO top
- DO WHILE .not. eof
- REPEAT 3 times varying xfld ;clear out output matrix
- REPEAT 3 times varying xcolumn
- labelout[xfld,xcolumn]=' '
- ENDREPEAT
- ENDREPEAT
- REPEAT 3 times varying xcolumn ;fill 3-across input matrix
- label[1,xcolumn]= ltrim(trim(FNAME)+" "+NAME)
- label[2,xcolumn]= ADDRESS
- label[3,xcolumn]= ltrim(trim(CITY)+", "+trim(STATE)+" "+ZIP)
- xline2=0
- REPEAT 3 times varying xline ;transfer only filled lines to output
- IF label[xline,xcolumn]>' '
- xline2=xline2+1
- labelout[xline2,xcolumn]=label[xline,xcolumn]
- ENDIF
- ENDREPEAT
- SKIP ;get next record
- IF eof ;quit when end of file reached
- BREAK
- ENDIF
- ENDREPEAT
- ? labelout ;print 3-across output matrix
- REPEAT 2 times ;3-line matrix plus blank line needs
- ? ; 2 extra form feeds to get to next label
- ENDREPEAT
- ENDDO
- REPEAT 6 times ;skip one more row of labels to make
- ? ; it easier to remove labels from printer
- ENDREPEAT
- SET print off
- RETURN
- *
- * *** end of program DONLABEL.PRG ***
-