|
See code changes outlined with >> Ron Power Programmer Information Services City Of St. John's, NL P.O. Box 908 St. John's, NL A1C 5M2 709-576-8132 rpower@xxxxxxxxxx http://www.stjohns.ca/ ___________________________________________________________________________ Success is going from failure to failure without a loss of enthusiasm. - Sir Winston Churchill "Brian Piotrowski" <bpiotrowski@xxxxxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 2005/10/13 04:15 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx> cc Subject RE: Printing a Subfile - Revisited Maybe it might be easier if I just post my Subroutine for printing - there might be something there my tired eyes can't see! :) BegSR PrintReport; rdashes = *ALL'-'; **WrkRrn=1; >>Rrn_Max = Rrn; >>Rrn = 1; write HEADING; **DoW WrkRrn < Rrn_Max; >>DoW Rrn < Rrn_Max; **Chain WrkRrn SPODATA; >>Chain Rrn SPODATA; If PrtOverFlow; Write HEADING; PrtOverflow = *off; endif; SPONUM = spno01 + '-' + spno02 + '-' + spno03; PARTCL = %subst(spptcl:1:7); SUPPLIER = spspcd + ' ' + spsplc; SPOSDATE = %subst(%char(spsddt):5:2) + '/' + %subst(%char(spsddt):7:2) + '/' + %subst(%char(spsddt):1:4); if %len(%trim(%char(spsdtm))) = 1; SPOSTIME = '00:0' + %trim(%char(spsdtm)); endif; if %len(%trim(%char(spsdtm))) = 2; SPOSTIME = '00:' + %trim(%char(spsdtm)); endif; if %len(%trim(%char(spsdtm))) = 3; SPOSTIME = '0' + %subst(%char(spsdtm):1:1) + ':' + %subst(%char(spsdtm):2:2); endif; if %len(%trim(%char(spsdtm))) = 4; SPOSTIME = %subst(%char(spsdtm):1:2) + ':' + %subst(%char(spsdtm):3:2); endif; PARTNO = %trim(spptno); QTY = %trim(%editc(spoqty:'3')); Write DETAIL; **WrkRrn = WrkRrn + 1; >>Rrn = Rrn + 1; EndDo; Write pfooter; Close SPOINQP; Open SPOINQP; EndSR; Thanks again! Brian.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.