#12687
DEholnikof
Participant

As a simple service, here is the code to get you started. The code should be expanded to include what is the column Amount, and to set the Print Options – but then we start getting into a program – and not just a few lines of code.

Copy (Cut & Paste) the code into any Procedure. Set a block on a report, then /GR MYPROC. Don’t forget to set your print options !!!

Hope this helps you get started
David

!


!
! This NPL Code provided free by
! Programmers Group – info@prgms.com
! Use as is, no support provided 2004
!


!
! This will exportprint the Name and Amount in Column 1
! You should set the print options,
! – APPEND = No
! – FileName = C:Myfile.txt
! Minimal error handling is here – but could be expanded
!


!
@declare Amt% = 101
@declare Acct$ = 102
@declare Main() = 103
!


!
@equ Main()
@ifblk @then
~CS ^M @loadkey Amt%
^M^M^M^M^M @loadkey Acct$
@stradd Acct$=”””” + Acct$
@stradd Acct$=Acct$ + “””,”
@stradd Acct$=Acct$ + Amt%
@print Acct$
^X
@loop Main()
@end @eol
@]
!


!
~GS
@iferr @esc
@else
@exec Main()
@end
!


!

Post Edited (11-15-04 12:34)