If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Other PC Databases > dBase printer commands for new PCs

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-20-11, 08:24
julespiano julespiano is offline
Registered User
 
Join Date: Jul 2011
Location: Cincinnati
Posts: 3
dBase printer commands for new PCs

Hi everyone -- new to the forum and probably one of the more obsolete members here. Wrote a program twenty years in dBase/Clipper - still be used! However, the user has tried to move the program to a laptop, and the printer USB hookup doesn't respond to the dBase printer commands ("set print on" / "set ... to print") Data is not being sent to the printer. Is dBase looking for a parallel port? Do I need to find an adaptor of some sort?

Thank you, thank you.
Reply With Quote
  #2 (permalink)  
Old 07-20-11, 10:32
kitaman kitaman is offline
Papabi's friend
 
Join Date: Sep 2009
Location: Ontario
Posts: 629
What is the "set printer to ....." statement?
Are you trying to write to the lpt1 port 278, or 378.
Are you using dbase or clipper.
What OS is the laptop and the desktop.
Reply With Quote
  #3 (permalink)  
Old 07-20-11, 20:58
julespiano julespiano is offline
Registered User
 
Join Date: Jul 2011
Location: Cincinnati
Posts: 3
It's in Clipper. I'm embarrassed to say I don't know at the moment what the desktop is - probably Windows 98. It prints to that, but the laptop, an XP, is not finding the printer.

I admit I haven't touched base with Clipper other than maintaining this program. There's a command to direct the port?
Reply With Quote
  #4 (permalink)  
Old 07-20-11, 22:34
julespiano julespiano is offline
Registered User
 
Join Date: Jul 2011
Location: Cincinnati
Posts: 3
Just became acquainted with "Printfil". Familiar with this?
Reply With Quote
  #5 (permalink)  
Old 07-21-11, 09:13
kitaman kitaman is offline
Papabi's friend
 
Join Date: Sep 2009
Location: Ontario
Posts: 629
I don't have a Clipper manual, but you might like this xHarbour.org .

In Foxbase and Foxpro

Code:
set printer to lpt2:
set printer to file "print01.txt"
set printer to "\\cpu\printer"
are all valid
Reply With Quote
  #6 (permalink)  
Old 07-21-11, 17:54
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,612
For most Clipper apps (Summer '87 and 5.x) you don't need to change the code at all.

First determine the UNC for the printer in the format \\computername\printername which can usually be found in the Control Pannel "Printers" applet.

I usually wrap Clipper programs inside a batch file when running on Windows versions after Windows 98. The batch file sets any environment variables (such as CLIP, etc) and handles setting up the legacy support (like printers). The file looks something like:
Code:
SET CLIP=M512;F39
NET USE LPT1: \\computername\printername
CLIPAPP.EXE
NET USE LTP1: /d
This ought to get you at least rudimentary printing. Note that using Legacy support usually implies that reports won't print until the program exits.

-PatP
__________________
In theory, theory and practice are identical. In practice, theory and practice are unrelated.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On