dreport spools output to wrong printer

Brian K. White brian at aljex.com
Sun Jul 31 12:27:54 PDT 2005


----- Original Message ----- 
From: "Barry Wiseman" <barry at gensoftdes.com>
To: "Kenneth Brody" <kenbrody at bestweb.net>
Cc: "filePro list" <filepro-list at lists.celestial.com>
Sent: Friday, July 29, 2005 5:47 PM
Subject: Re: dreport spools output to wrong printer


> Kenneth Brody wrote:
>> Quoting Barry Wiseman (Fri, 29 Jul 2005 15:58:10 -0400):
>>
>>
>>>Spent this afternoon pounding my head over a report that filePro was
>>>stubbornly sending to the wrong printer.
>>
>> [...]
>>
>>>config file had (irrelevant entries omitted):
>>>
>>>printer7 = jeff,dr_hp3,lp -s -djeff,Jeff's printer
>>>printer8 = mary,dr_hp3,lp -s -dmary,Accting printer
>>>printer9 = dr_hp3,dr_hp3
>>>
>>>Output table had Printer name: dr_hp3
>>>
>>>With no -p on the command line, no value in LPDEST, no "printer"
>>>statements in processing, I would expect the report to go to the default
>>>printer, "hp8100".  Instead, it was going to "jeff".
>>
>>
>> The output format had the printer name "dr_hp3".  Therefore, since
>> printer7 is of type "dr_hp3", it went there.  (That is, "jeff".)
>>
>> Why would you expect filePro to go to the default printer, when the
>> output format specifies "dr_hp3"?
>>
>> This is the expected, documented behavior.
>
> I thought the "Printer name" in the output format refers to entries in the 
> "Name" column in pmaint.  You're telling me "Printer name" specifies not 
> printer name but printer type.  Silly me.
>
>> It's still picking printer7 (the first "dr_hp3").  However, since
>> this has no destination specified, it uses the default.
>
> It does *not* use the default.  Whose default?  Filepro's?
>
> pfprinter = default
> printer1 = default,default,lp -s
>
> Linux's?
>
> system default destination: hp8100
> device for hp8100: socket://192.168.1.4:9100
> device for jeff: socket://192.168.1.5:9100
> device for mary: socket://192.168.1.6:9100
>
> Seems to me only by specifying printer name "jeff" (either in the output 
> format or in processing) should filePro ever launch an "lp -djeff" 
> command.
>
> Let's render this more generically:
>
> printer1 = foo,laser,lp -dprinter1
> printer2 = bar,laser,lp -dprinter2
> printer3 = laser,laser,lp
>
> Doesn't this mean that 'printer name "foo"' would use printcode table 
> "laser" and spool output to printer1?  And 'printer name "laser"' would 
> again use printcode table "laser" but spool to the OS's default printer?

Barring the presence of any of these
  PFPRINTER   # obvious
  LPDEST         # does this even mean anything on linux?
  PRINTER       # linux's version of LPDEST
  PFPT              # overrides everything if the termcap has PN & PS
in either the environment or the fp config file, then yes that is how it 
should work.

> Problem seems to be the use of "laser" as both a printcode table name, and 
> also a printer name.  Is this an unexpected event in filePro?

I only recently hit what I thought was a bug (but wasn't) about that very 
question.
Although pressing F6 to select the printer in define output shows you a list 
of types as well as printers, you need to select a printer not a type that's 
only a type.
I used to think it was a way to hard code the print code table without hard 
coding the the physical destination, until the first time I actually tried 
to do it and got an error about no such printer, using default.

As for the duplicate name, we usually have a printer named hplaser and 
usually but not always it's also the default. I haven't ever had a problem 
with having the wrong printer used than the one I wanted, but it might be 
just because I happen to always have a pfprinter in the config file and and 
always have something in the destination field. I sometimes don't have a -d 
destination flag but always at least some kind of command, generally 
"lp -s -o raw".

There is an exception to that "always". I sometimes have a printer defined 
just to define it's print code table, and no destination at all, but I only 
use that printer in combination with PFPT, and that also always worked as 
expected, except on linux where it crashes if -pq is used and there is any 
destination-less printer definitions in the config file.

Your real example has no destination, your mock example has at least an lp 
command. You didn't mention PRINTER or PFPT.

Brian K. White  --  brian at aljex.com  --  http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro  BBx    Linux  SCO  FreeBSD    #callahans  Satriani  Filk!



More information about the Filepro-list mailing list