Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2011
    Location
    Cincinnati
    Posts
    3

    Unanswered: 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.

  2. #2
    Join Date
    Sep 2009
    Location
    Ontario
    Posts
    1,057
    Provided Answers: 1
    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.

  3. #3
    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?

  4. #4
    Join Date
    Jul 2011
    Location
    Cincinnati
    Posts
    3
    Just became acquainted with "Printfil". Familiar with this?

  5. #5
    Join Date
    Sep 2009
    Location
    Ontario
    Posts
    1,057
    Provided Answers: 1
    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

  6. #6
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •