Hi gang, I'm in the process of tweaking one of our reports which use a "LIST ... LPTR" command line to spool the output to the default printer. However, the results are too wide for portrait orientation and was wanting to find a way to set the orientation with SETPTR prior to the execution of the LIST statement.
I tried to use the following statement but that doesn't seem to change the default orientation of the printer: UDTEXECUTE 'SETPTR 0,,,,,1,,"Orientation=LANDSCAPE"' CAPTURING ASPMSG More code pasted below: 095: * 096: *-- SELECTION 097: * 098: PRINT @(0,21):@(-4):"Sort/Select in progress..." 099: START.DATE=OCONV(START.DATE,'D2/') 100: END.DATE=OCONV(END.DATE,'D2/') 101: INIT.CMD='SELECT JOB.MATL WITH' 102: IF START.PERIOD # END.PERIOD THEN 103: INIT.CMD := ' CONO_WPER GE "':CONO:START.PERIOD:'" AND WITH CONO_WPER LE "':CONO:END.PERIOD:'"' 104: END ELSE 105: INIT.CMD := ' CONO_WPER EQ "':CONO:START.PERIOD:'"' 106: END 107: UDTEXECUTE INIT.CMD CAPTURING ASPMSG 108: * 109: UDTEXECUTE 'SETPTR 0,,,,,1,,"Orientation=LANDSCAPE"' CAPTURING ASPMSG 110: CMD = 'LIST JOB.MATL BY CTR BY JOB BY PERIOD BY DATE BY TRANS WITH' 111: IF DEPT.IN <http://DEPT.IN> # 'ALL' THEN 112: CMD:=' JMT.DEPT = "':DEPT.IN:'"' 113: IF DEPT.IN <http://DEPT.IN> = '23' THEN 114: CMD:=' AND WITH GJOB.CHECK # ""' 115: CMD:=' AND WITH P.QTY > "0"' 116: END 117: END 118: IF START.DATE NE END.DATE THEN 119: CMD:=' AND WITH DATE GE "':START.DATE:'" AND WITH DATE LE "':END.DATE: '"' 120: END ELSE 121: CMD:=' AND WITH DATE EQ "':START.DATE:'"' 122: END 123: IF BEG.JOB.NUM # "ALL" THEN 124: CMD:=' AND WITH JOB GE "':BEG.JOB.NUM:'" AND WITH JOB LE "': END.JOB.NUM:'"' 125: END 126: CMD:=' ID-SUPP' 127: IF DEPT.IN <http://DEPT.IN> = 'ALL' THEN 128: CMD:=' BREAK-ON NP-DIV.DESC "':"'V'":'"' 129: CMD:=' BREAK-ON NP-JOB.DESC "':"'V'":'"' 130: END 131: CMD:=' JOB PROD JMT.R.S.ID <http://JMT.R.S.ID> WHSE CTR TYP CUST TRANS PERIOD DATE RC.JOB RC.TRAN' 132: CMD:=' TOTAL P.QTY TOTAL S.QTY UM TOTAL MATL.COST TOTAL SALE' 133: CMD:=' HEADING "':"'TLC'":' JOB MATERIAL HISTORY REPORT ':"'LC'" 134: CMD:=' PERIOD ':START.PERIOD:' THUR ':END.PERIOD:' - DATE ':START.DATE 135: CMD:=' THROUGH ':END.DATE:" 'L'":'" GRAND-TOTAL' 136: CMD:=' " TOTAL FOR COMPANY - ':"'U'":'"' 137: CMD:=' LPTR ' 138: EXECUTE CMD CAPTURING ERRMSG I've checked numerous manuals and reference materials I have readily available to me and can't seem to find a decent example of what I'm trying to accomplish. I know I could re-write this report to not use the "LIST ... LPTR" statement but instead use PRINTER ON, PRINT, and PRINTER OFF commands...wanted to try avoid having to re-write the report at the present time though. TIA, Andy ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/