Normal Topic Selecting Printer using @ClientLocalValue ( ) (Read 867 times)
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Selecting Printer using @ClientLocalValue ( )
May 27th, 2008 at 7:44pm
Print Post Print Post  
For certain printing job, I want to use local printer for one client to whom printer is connected while the other clients will use the same printer using the network printer. I guess, using different @ClientLocalvalue () I can differentiate what client will use which printer.

IBM 4039 LaserPrinter attached to Client named Reception

The printer is shared using name "IBM5PCL"

From other clients using printer name -  "\\Reception\IBM5PCL"  prints out fine but would not print from the Client "Reception".  I believe, I have to use "IBM 4039 LaserPrinter" when printing from the client to whom the printer is attached locally.  But in order to differentiate the clients, how do I use the @clientlocalvalue ( ) as the coding will be applied to all clients?



  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Selecting Printer using @ClientLocalValue ( )
Reply #1 - May 27th, 2008 at 7:49pm
Print Post Print Post  
If this requirement is particular to one machine (as opposed to one person), you might be better off using a command line User Parameter. See the documentation for @UserParameter. These can also be set in the ini file.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Selecting Printer using @ClientLocalValue ( )
Reply #2 - May 27th, 2008 at 7:55pm
Print Post Print Post  
Unfortunately @USERID parameter would not work as the same user would be using other clients as well the client to which the printer is attached.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Selecting Printer using @ClientLocalValue ( )
Reply #3 - May 27th, 2008 at 8:00pm
Print Post Print Post  
Bharat_Naik wrote on May 27th, 2008 at 7:55pm:
Unfortunately @USERID parameter would not work as the same user would be using other clients as well the client to which the printer is attached.


Not @UserID. UserParameter. It's different and you can set it to whatever you want. It's for exactly this situation. Read up on it. I think it will do what you need.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Selecting Printer using @ClientLocalValue ( )
Reply #4 - May 27th, 2008 at 10:03pm
Print Post Print Post  
Quote:
It's for exactly this situation. Read up on it. I think it will do what you need.


Client#1:
User_Param goes in commandline startup as under:

sesame -user_param "accounting" MyApp.db


ClientE#2
sesame -user_param "Billing" MyApp.db



It goes into the .ini file as below

sesame -user_param "accounting" -user_param "Billing"

I am not clear about how it is being used since the following values will be common to both the clients.

@Userparameter (1) = "Accounting"
@UserParameter (2) = "Billing"

I will appreciate if you kindly make it clear for me.


Startup commandline and .ini file parameters are used independently or they are used in conjunction with each other?

  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Selecting Printer using @ClientLocalValue ( )
Reply #5 - May 28th, 2008 at 12:20am
Print Post Print Post  
You need only the command line switch or the ini file. Not both. It's two ways to do the same thing.

Using the command line, the one machine that needs to be different might use this:
sesame -user_param "PrinterA"

The other machines might start with:
sesame -user_param "PrinterB"

In the code that sends your job to the printer you do something like:

var vPrinter as String

    vPrinter = @UserParameter(1)
    If vPrinter = "PrinterA"
    {
       // Send the job to "IBM 4039 LaserPrinter"
    }
    Else
    {
       // Send the job to "\\Reception\IBM5PCL"
    }
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Selecting Printer using @ClientLocalValue ( )
Reply #6 - May 28th, 2008 at 3:37am
Print Post Print Post  
Thanks Erika, got it now. I like the topics for Next Friday Online Information Session. Thanks again.
  
Back to top
 
IP Logged