Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Setprintprinter()

4 posts in Objects Last posting was on 2005-03-16 11:03:18.0Z
MJN Posted on 2005-03-15 16:02:00.0Z
From: "MJN" <SpamFilterOnlychuck1rar@yahoo.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Setprintprinter()
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: zaq3d73a998.zaq.ne.jp
X-Original-NNTP-Posting-Host: zaq3d73a998.zaq.ne.jp
Message-ID: <423706f8@forums-1-dub>
Date: 15 Mar 2005 08:02:00 -0800
X-Trace: forums-1-dub 1110902520 61.115.169.152 (15 Mar 2005 08:02:00 -0800)
X-Original-Trace: 15 Mar 2005 08:02:00 -0800, zaq3d73a998.zaq.ne.jp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8265
Article PK: 735526

Am using the setprintprinter function but the printer always being printed
to is the default.
Both printers are localaly connected but the client is a thin client
connecting by rdp to a W2003 server.
When I test this function without TS at all works fine so there must be
something in the TS environment that is stuffing this up...
The printer name is "Star" so it shouldn't be a name conflict..
It re-iterate both printers are connected to the server.
Any ideas??

PB9.02

//open cash drawer
long job
string Star
PrintSetPrinter (Star)
Job = PrintOpen( )
Print(Job, "Open")
PrintClose(Job)


Mike Shumway Posted on 2005-03-15 17:25:33.0Z
From: "Mike Shumway" <shummer_mc@yahoo.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <423706f8@forums-1-dub>
Subject: Re: Setprintprinter()
Lines: 46
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-Mimeole: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 168.178.30.151
X-Original-NNTP-Posting-Host: 168.178.30.151
Message-ID: <42371a8d$1@forums-1-dub>
Date: 15 Mar 2005 09:25:33 -0800
X-Trace: forums-1-dub 1110907533 168.178.30.151 (15 Mar 2005 09:25:33 -0800)
X-Original-Trace: 15 Mar 2005 09:25:33 -0800, 168.178.30.151
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8266
Article PK: 735527

Did you check to see that the PrintSetPrinter() worked?

You could MessageBox ("", PrintGetPrinter()) after you set it to see... (or
check for a -1).

My guess is that the string isn't enough info... so the PrintSetPrinter is
failing. You should do a PrintGetPrinters(), etc. to retrieve the Star
String. It seems to include more than just the name. Here's an example
from the online help in PB:

long ll_place
string ls_setprn

string ls_prntrs = PrintGetPrinters ( )
ll_place=pos (ls_prntrs, "~n")
mle_1.text = PrintGetPrinters ( )
ls_setprn = Left (ls_prntrs, ll_place - 1)
PrintSetPrinter (ls_setprn)

"MJN" <SpamFilterOnlychuck1rar@yahoo.com> wrote in message
news:423706f8@forums-1-dub...
> Am using the setprintprinter function but the printer always being printed
> to is the default.
> Both printers are localaly connected but the client is a thin client
> connecting by rdp to a W2003 server.
> When I test this function without TS at all works fine so there must be
> something in the TS environment that is stuffing this up...
> The printer name is "Star" so it shouldn't be a name conflict..
> It re-iterate both printers are connected to the server.
> Any ideas??
>
> PB9.02
>
> //open cash drawer
> long job
> string Star
> PrintSetPrinter (Star)
> Job = PrintOpen( )
> Print(Job, "Open")
> PrintClose(Job)
>
>


MJN Posted on 2005-03-16 06:55:26.0Z
From: "MJN" <SpamFilterOnlychuck1rar@yahoo.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <423706f8@forums-1-dub> <42371a8d$1@forums-1-dub>
Subject: Re: Setprintprinter()
Lines: 66
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-Original-NNTP-Posting-Host: flh9aab003.wky.mesh.ad.jp
Message-ID: <4237d85a$1@forums-2-dub>
X-Original-Trace: 15 Mar 2005 22:55:22 -0800, flh9aab003.wky.mesh.ad.jp
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 15 Mar 2005 22:55:23 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 15 Mar 2005 22:55:26 -0800
X-Trace: forums-1-dub 1110956126 10.22.108.75 (15 Mar 2005 22:55:26 -0800)
X-Original-Trace: 15 Mar 2005 22:55:26 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8267
Article PK: 735529

Yeah well if i use the below then it still prints to the default.
So the setprintprinter() is getting the name but not actually setting it...
There are two printers and ls_setprn gets the NON default printer but still
doesnt print to that..

//open cash drawer
long ll_place,job
string ls_setprn, ls_prntrs
ls_prntrs = PrintGetPrinters ( )
ll_place=pos (ls_prntrs, "~n")
ls_setprn = Right (ls_prntrs, ll_place - 1)
PrintSetPrinter (ls_setprn)
Job = PrintOpen( )
Print(Job, "Sybase Corporation")
PrintClose(Job)

"Mike Shumway" <shummer_mc@yahoo.com> wrote in message
news:42371a8d$1@forums-1-dub...
> Did you check to see that the PrintSetPrinter() worked?
>
> You could MessageBox ("", PrintGetPrinter()) after you set it to see...
> (or check for a -1).
>
> My guess is that the string isn't enough info... so the PrintSetPrinter is
> failing. You should do a PrintGetPrinters(), etc. to retrieve the Star
> String. It seems to include more than just the name. Here's an example
> from the online help in PB:
>
> long ll_place
> string ls_setprn
>
> string ls_prntrs = PrintGetPrinters ( )
> ll_place=pos (ls_prntrs, "~n")
> mle_1.text = PrintGetPrinters ( )
> ls_setprn = Left (ls_prntrs, ll_place - 1)
> PrintSetPrinter (ls_setprn)
>
>
>
> "MJN" <SpamFilterOnlychuck1rar@yahoo.com> wrote in message
> news:423706f8@forums-1-dub...
>> Am using the setprintprinter function but the printer always being
>> printed to is the default.
>> Both printers are localaly connected but the client is a thin client
>> connecting by rdp to a W2003 server.
>> When I test this function without TS at all works fine so there must be
>> something in the TS environment that is stuffing this up...
>> The printer name is "Star" so it shouldn't be a name conflict..
>> It re-iterate both printers are connected to the server.
>> Any ideas??
>>
>> PB9.02
>>
>> //open cash drawer
>> long job
>> string Star
>> PrintSetPrinter (Star)
>> Job = PrintOpen( )
>> Print(Job, "Open")
>> PrintClose(Job)
>>
>>
>
>


Joost Bloemsma <dontspam_joost.bloemsma Posted on 2005-03-16 11:03:18.0Z
From: Joost Bloemsma <dontspam_joost.bloemsma@dlm.nl.com_dontspam>
Reply-To: dontspam_joost.bloemsma@dlm.nl.com_dontspam
Organization: DLM bv
User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Setprintprinter()
References: <423706f8@forums-1-dub>
In-Reply-To: <423706f8@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: fia187-16-100.dsl.hccnet.nl
X-Original-NNTP-Posting-Host: fia187-16-100.dsl.hccnet.nl
Message-ID: <42381276$2@forums-1-dub>
Date: 16 Mar 2005 03:03:18 -0800
X-Trace: forums-1-dub 1110970998 80.100.16.187 (16 Mar 2005 03:03:18 -0800)
X-Original-Trace: 16 Mar 2005 03:03:18 -0800, fia187-16-100.dsl.hccnet.nl
Lines: 35
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8268
Article PK: 735530

The default printer you're mentioning, is that the default printer
connected to the client or the Win2003 machine?
TS (I guess you mean Terminal Server?) has an option to rerout all
printer commands to your local printer. Check if this is set.

--
******************************
** Joost A. Bloemsma
** PowerBuilder Developer
** DLM bv (www.dlm.nl.com)
******************************

MJN wrote:
> Am using the setprintprinter function but the printer always being printed
> to is the default.
> Both printers are localaly connected but the client is a thin client
> connecting by rdp to a W2003 server.
> When I test this function without TS at all works fine so there must be
> something in the TS environment that is stuffing this up...
> The printer name is "Star" so it shouldn't be a name conflict..
> It re-iterate both printers are connected to the server.
> Any ideas??
>
> PB9.02
>
> //open cash drawer
> long job
> string Star
> PrintSetPrinter (Star)
> Job = PrintOpen( )
> Print(Job, "Open")
> PrintClose(Job)
>
>