Alaska Software Inc. - USB Printing With xBase++ Compiled Clipper function
Username: Password:
AuthorTopic: USB Printing With xBase++ Compiled Clipper function
Carmelo RiofloridoUSB Printing With xBase++ Compiled Clipper function
on Fri, 23 Dec 2005 16:08:32 -0800
I compiled the clipper Form Label prgs with xBase++ 1.82. However, I cannot
print the 10R x 3C labels on HP Laser 1012 (USB) but it prints on the HP
LaserJet 1100 and LaserJet 4V (LPT1). My codes are as follows:

 cPrinter := tdPrnDlg("Select Printer:",0,cPrinter,aPrns)
   oP := tdcPrn2():New(cPrinter)
   if oP:lInitErr
      dbcloseall()
      return .F.
   endif
   oP:Create(cPrinter)
   oP:StartDoc()
   oP:setCond('on')
   sele prospect
   DBsetorder(2)
   dbgotop()
   label form PROLASER to printer NOCONSOLE;
     while ! eof() .and. inkey() != 27
   op:setcond('off')
   op:enddoc()
   op:destroy()

Can somebody let me know what can I do to be able to print on the USB port?

Thanks and Merry Christmas to everybody.

Carmelo Rioflorido
Sander Elias Re: USB Printing With xBase++ Compiled Clipper function
on Sat, 24 Dec 2005 08:19:16 +0100
Hi Carmelo,

>I compiled the clipper Form Label prgs with xBase++ 1.82. However, I cannot
>print the 10R x 3C labels on HP Laser 1012 (USB) but it prints on the HP
>LaserJet 1100 and LaserJet 4V (LPT1). My codes are as follows:
>
> cPrinter := tdPrnDlg("Select Printer:",0,cPrinter,aPrns)
>   oP := tdcPrn2():New(cPrinter)
>   if oP:lInitErr
>      dbcloseall()
>      return .F.
>   endif
>   oP:Create(cPrinter)
>   oP:StartDoc()
>   oP:setCond('on')
>   sele prospect
>   DBsetorder(2)
>   dbgotop()
>   label form PROLASER to printer NOCONSOLE;
>     while ! eof() .and. inkey() != 27
>   op:setcond('off')
>   op:enddoc()
>   op:destroy()
I could not say for sure without the code off form label, but my guess
is that you are using a different printer. I suspect that you are
printing to lpt1, in stead off to the printer-object you created.

my thoughts are supported by the fact that I see NO link off the
printer object to the label form command!

Regards
Sander Elias
Carmelo RiofloridoRe: USB Printing With xBase++ Compiled Clipper function
on Sat, 24 Dec 2005 16:07:43 -0800
Sander,

Attached are the label files which I compiled with xBase++. I don't see any
reference to the printer object in these files or I just don't know what to
look for.

Thank you for your valuable response and Merry Christmas to you.

Carmelo Rioflorido


**********************************
"Sander Elias" <Sander@eso.nl> wrote in message
news:4ctpq195dcj2kr5or34crk1kg1kh02e59o@4ax.com...
> Hi Carmelo,
> > I could not say for sure without the code off form label, but my guess
> is that you are using a different printer. I suspect that you are
> printing to lpt1, in stead off to the printer-object you created.
>
> my thoughts are supported by the fact that I see NO link off the
> printer object to the label form command!
>
> Regards
> Sander Elias




> >I compiled the clipper Form Label prgs with xBase++ 1.82. However, I
cannot
> >print the 10R x 3C labels on HP Laser 1012 (USB) but it prints on the HP
> >LaserJet 1100 and LaserJet 4V (LPT1). My codes are as follows:
> >
> > cPrinter := tdPrnDlg("Select Printer:",0,cPrinter,aPrns)
> >   oP := tdcPrn2():New(cPrinter)
> >   if oP:lInitErr
> >      dbcloseall()
> >      return .F.
> >   endif
> >   oP:Create(cPrinter)
> >   oP:StartDoc()
> >   oP:setCond('on')
> >   sele prospect
> >   DBsetorder(2)
> >   dbgotop()
> >   label form PROLASER to printer NOCONSOLE;
> >     while ! eof() .and. inkey() != 27
> >   op:setcond('off')
> >   op:enddoc()
> >   op:destroy()








LBLRUN.PRG
LBLDEF.CH
LBLBACK.PRG
James Loughner Re: USB Printing With xBase++ Compiled Clipper function
on Sat, 24 Dec 2005 21:06:05 -0500
There is none because this is a Clipper program and there was no concept 
of a printer object in DOS. You need to change all the printer output to 
  the Topdown eqivalent of QQOUT() and QOUT()in the PRINTIT() function. 
You also need to pass a reference to the printer device in the original 
call so it is available to the PRINTIT() functon. It looks like PRINTIT 
is the only function needing modification.

Jim

Carmelo Rioflorido wrote:
> Sander,
> 
> Attached are the label files which I compiled with xBase++. I don't see any
> reference to the printer object in these files or I just don't know what to
> look for.
> 
> Thank you for your valuable response and Merry Christmas to you.
> 
> Carmelo Rioflorido
> 
> 
> **********************************
> "Sander Elias" <Sander@eso.nl> wrote in message
> news:4ctpq195dcj2kr5or34crk1kg1kh02e59o@4ax.com...
> 
>>Hi Carmelo,
>>
>>>I could not say for sure without the code off form label, but my guess
>>
>>is that you are using a different printer. I suspect that you are
>>printing to lpt1, in stead off to the printer-object you created.
>>
>>my thoughts are supported by the fact that I see NO link off the
>>printer object to the label form command!
>>
>>Regards
>>Sander Elias
> 
> 
> 
> 
> 
>>>I compiled the clipper Form Label prgs with xBase++ 1.82. However, I
> 
> cannot
> 
>>>print the 10R x 3C labels on HP Laser 1012 (USB) but it prints on the HP
>>>LaserJet 1100 and LaserJet 4V (LPT1). My codes are as follows:
>>>
>>>cPrinter := tdPrnDlg("Select Printer:",0,cPrinter,aPrns)
>>>  oP := tdcPrn2():New(cPrinter)
>>>  if oP:lInitErr
>>>     dbcloseall()
>>>     return .F.
>>>  endif
>>>  oP:Create(cPrinter)
>>>  oP:StartDoc()
>>>  oP:setCond('on')
>>>  sele prospect
>>>  DBsetorder(2)
>>>  dbgotop()
>>>  label form PROLASER to printer NOCONSOLE;
>>>    while ! eof() .and. inkey() != 27
>>>  op:setcond('off')
>>>  op:enddoc()
>>>  op:destroy()
> 
> 
>
Carmelo RiofloridoRe: USB Printing With xBase++ Compiled Clipper function
on Mon, 26 Dec 2005 21:21:14 -0800
Jim,
I modified the PRINTIT() function to Topdown  equivalent and was able to
print. However, it would only print the first Row of 3 columns of labels out
of the 10 row x 3 columns of labels that supposed to be printed. The output
is in the format shown below:

xxxxxxx       xxxxxxx      xxxxxxx
                                                       xxxxxxx    xxxxxxx
xxxxxxx

xxxxxx

and the coding is as follows:

STATIC PROCEDURE  PrintIt(cString)
    if cString == NIL
        cString := ""
    endif
    op:QQ(cString)
    op:Q()
return

Is there something else to be done on this function?

Thanks for your help.

Carmelo

*******************************
"James Loughner" <jwrl@charter.net> wrote in message
news:0nEqbhPCGHA.1256@S15147418...
> There is none because this is a Clipper program and there was no concept
> of a printer object in DOS. You need to change all the printer output to
>   the Topdown eqivalent of QQOUT() and QOUT()in the PRINTIT() function.
> You also need to pass a reference to the printer device in the original
> call so it is available to the PRINTIT() functon. It looks like PRINTIT
> is the only function needing modification.
>
> Jim
>
> Carmelo Rioflorido wrote:
> > Sander,
> >
> > Attached are the label files which I compiled with xBase++. I don't see
any
> > reference to the printer object in these files or I just don't know what
to
> > look for.
> >
> > Thank you for your valuable response and Merry Christmas to you.
> >
> > Carmelo Rioflorido
> >
> >
> > **********************************
> > "Sander Elias" <Sander@eso.nl> wrote in message
> > news:4ctpq195dcj2kr5or34crk1kg1kh02e59o@4ax.com...
> >
> >>Hi Carmelo,
> >>
> >>>I could not say for sure without the code off form label, but my guess
> >>
> >>is that you are using a different printer. I suspect that you are
> >>printing to lpt1, in stead off to the printer-object you created.
> >>
> >>my thoughts are supported by the fact that I see NO link off the
> >>printer object to the label form command!
> >>
> >>Regards
> >>Sander Elias
> >
> >
> >
> >
> >
> >>>I compiled the clipper Form Label prgs with xBase++ 1.82. However, I
> >
> > cannot
> >
> >>>print the 10R x 3C labels on HP Laser 1012 (USB) but it prints on the
HP
> >>>LaserJet 1100 and LaserJet 4V (LPT1). My codes are as follows:
> >>>
> >>>cPrinter := tdPrnDlg("Select Printer:",0,cPrinter,aPrns)
> >>>  oP := tdcPrn2():New(cPrinter)
> >>>  if oP:lInitErr
> >>>     dbcloseall()
> >>>     return .F.
> >>>  endif
> >>>  oP:Create(cPrinter)
> >>>  oP:StartDoc()
> >>>  oP:setCond('on')
> >>>  sele prospect
> >>>  DBsetorder(2)
> >>>  dbgotop()
> >>>  label form PROLASER to printer NOCONSOLE;
> >>>    while ! eof() .and. inkey() != 27
> >>>  op:setcond('off')
> >>>  op:enddoc()
> >>>  op:destroy()
> >
> >
> >
James Loughner Re: USB Printing With xBase++ Compiled Clipper function
on Tue, 27 Dec 2005 02:18:43 -0500
Sorry don't know. You might contact Clayton about it. Apparently QQ is 
not quit equivalent. I don't use Topdown so I have no real experience 
with it. It is just obvious that you need to use a Windows print 
function to print to a Windows printer. And Windows printing is 
different because it is page oriented rather then line oriented.

Jim

Carmelo Rioflorido wrote:
> Jim,
> I modified the PRINTIT() function to Topdown  equivalent and was able to
> print. However, it would only print the first Row of 3 columns of labels out
> of the 10 row x 3 columns of labels that supposed to be printed. The output
> is in the format shown below:
> 
> xxxxxxx       xxxxxxx      xxxxxxx
>                                                        xxxxxxx    xxxxxxx
> xxxxxxx
> 
> xxxxxx
> 
> and the coding is as follows:
> 
> STATIC PROCEDURE  PrintIt(cString)
>     if cString == NIL
>         cString := ""
>     endif
>     op:QQ(cString)
>     op:Q()
> return
> 
> Is there something else to be done on this function?
> 
> Thanks for your help.
> 
> Carmelo
> 
> *******************************
> "James Loughner" <jwrl@charter.net> wrote in message
> news:0nEqbhPCGHA.1256@S15147418...
> 
>>There is none because this is a Clipper program and there was no concept
>>of a printer object in DOS. You need to change all the printer output to
>>  the Topdown eqivalent of QQOUT() and QOUT()in the PRINTIT() function.
>>You also need to pass a reference to the printer device in the original
>>call so it is available to the PRINTIT() functon. It looks like PRINTIT
>>is the only function needing modification.
>>
>>Jim
>>
>>Carmelo Rioflorido wrote:
>>
>>>Sander,
>>>
>>>Attached are the label files which I compiled with xBase++. I don't see
> 
> any
> 
>>>reference to the printer object in these files or I just don't know what
> 
> to
> 
>>>look for.
>>>
>>>Thank you for your valuable response and Merry Christmas to you.
>>>
>>>Carmelo Rioflorido
>>>
>>>
>>>**********************************
>>>"Sander Elias" <Sander@eso.nl> wrote in message
>>>news:4ctpq195dcj2kr5or34crk1kg1kh02e59o@4ax.com...
>>>
>>>
>>>>Hi Carmelo,
>>>>
>>>>
>>>>>I could not say for sure without the code off form label, but my guess
>>>>
>>>>is that you are using a different printer. I suspect that you are
>>>>printing to lpt1, in stead off to the printer-object you created.
>>>>
>>>>my thoughts are supported by the fact that I see NO link off the
>>>>printer object to the label form command!
>>>>
>>>>Regards
>>>>Sander Elias
>>>
>>>
>>>
>>>
>>>
>>>>>I compiled the clipper Form Label prgs with xBase++ 1.82. However, I
>>>
>>>cannot
>>>
>>>
>>>>>print the 10R x 3C labels on HP Laser 1012 (USB) but it prints on the
> 
> HP
> 
>>>>>LaserJet 1100 and LaserJet 4V (LPT1). My codes are as follows:
>>>>>
>>>>>cPrinter := tdPrnDlg("Select Printer:",0,cPrinter,aPrns)
>>>>> oP := tdcPrn2():New(cPrinter)
>>>>> if oP:lInitErr
>>>>>    dbcloseall()
>>>>>    return .F.
>>>>> endif
>>>>> oP:Create(cPrinter)
>>>>> oP:StartDoc()
>>>>> oP:setCond('on')
>>>>> sele prospect
>>>>> DBsetorder(2)
>>>>> dbgotop()
>>>>> label form PROLASER to printer NOCONSOLE;
>>>>>   while ! eof() .and. inkey() != 27
>>>>> op:setcond('off')
>>>>> op:enddoc()
>>>>> op:destroy()
>>>
>>>
>>>
> 
>
Bop SprengersRe: USB Printing With xBase++ Compiled Clipper function
on Tue, 31 Jan 2006 19:01:58 +0100
I had the same problem at a customers site.
The HP Laserjet 1012 is a WinPrinter, no support
for DOS.
Solution was simple but expensive: installed a new
(DOS-compattible) printer.

Greetz,
Bop Sprengers
BS-SOFT
Antwerpe

"Carmelo Rioflorido" <unisoft@cox.net> schreef in bericht 
news:x8Mnp6BCGHA.5608@S15147418...
>I compiled the clipper Form Label prgs with xBase++ 1.82. However, I cannot
> print the 10R x 3C labels on HP Laser 1012 (USB) but it prints on the HP
> LaserJet 1100 and LaserJet 4V (LPT1). My codes are as follows:
>
> cPrinter := tdPrnDlg("Select Printer:",0,cPrinter,aPrns)
>   oP := tdcPrn2():New(cPrinter)
>   if oP:lInitErr
>      dbcloseall()
>      return .F.
>   endif
>   oP:Create(cPrinter)
>   oP:StartDoc()
>   oP:setCond('on')
>   sele prospect
>   DBsetorder(2)
>   dbgotop()
>   label form PROLASER to printer NOCONSOLE;
>     while ! eof() .and. inkey() != 27
>   op:setcond('off')
>   op:enddoc()
>   op:destroy()
>
> Can somebody let me know what can I do to be able to print on the USB 
> port?
>
> Thanks and Merry Christmas to everybody.
>
> Carmelo Rioflorido
>
>
>
>
>
Joe Carrick Re: USB Printing With xBase++ Compiled Clipper function
on Tue, 31 Jan 2006 12:09:33 -0800
The answer for this is to share and map the printer.  This is the only 
way a DOS program can recognize a USB printer.
You then can do a "NET USE LPTx: SharedName /p" to establish the link 
between the 2 device names.

We use this in a batch file on start-up with WinXP and there's no 
problem.  You must get the "SharedName" exactly right.  ie:

\\Susan-presario\SusanHP5540

where "Susan-presario" is the computer name and "SusanHP5440" is the 
name of the printer.  I believe this is case sensitive as well.