Andy,

Not sure what the problem is:
a.    You don't know how to talk to the printer to reconfigure it?
b.    The printer does not remain reconfigured after the program ends that
reconfigures it.

So, the same old question:
    What database (looks like Unidata from your code)?
    What operating system?

In Universe on NT, talking to a Windows laser printer, the printer reverts
to its default configuration after the program closes that reconfigures it.
Any job that prints from within the reconfiguration program prints correctly
on the reconfigured printer.  Any other printing  that prints after the
reconfiguration program closes - eg from another program, a proc or TCL -
prints incorrectly.

If this is your problem, the solution is simple:
    Install another logical printer on the same printer port (ie. using the
same physical printer), only install it using the "Generic/Text" driver from
the "Generic" manufacturer in Windows.  Also, set the Print Processor to
"Win Print" and the Data Processor to "Raw".

This Text printer will then retain its configuration even after the
reconfiguration program (eg. a printer driver) has completed.

hth

Dave

Dave Taylor
President
Sysmark Information Systems, Inc.
49 Aspen Way
Rolling Hills Estates, CA 90274
800-SYSMARK (800-797-6275)
(O) 310-544-1974
(P) 800-339-1497
(F) 310-377-3550
Your Source for Integrated EDI Translation and DataSync Integration
www.sysmarkinfo.com

----- Original Message ----- 
From: "Andy Pflueger" <[EMAIL PROTECTED]>
To: "U2 User Group Mailing List" <u2-users@listserver.u2ug.org>
Sent: Monday, September 19, 2005 5:26 AM
Subject: [U2] LPTR / SETPTR / landscape orientation example


> 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/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to