Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dbase III Plus Output To USB Port 4

Status
Not open for further replies.

rayleo

Programmer
Dec 6, 2000
3
US
I have developed several DBase III Plus applications that puts
out a lot of printing. When my printers have been connected to
LPT1, LPT2, or Com1, and I used the "SET PRINTER TO" command,
my out put went to the desired port. I have just purchased a
Gatewood with a HP DeskJet that is connected to my PC through
the USB port connection. Now, when I run my DBase III Plus
applications and select print, I get the error message,
"Printer Not Ready". When use the "SET PRINTER TO" command to
direct the output to the USB Port, I get the error message
"SYNTAX ERROR". I realize that DBase III Plus only recognize
DOS port assignments but, since the state-of-art have
advanced, is there a command or application that I can invoke
that will allow DBase to recognize a printer attached to a
USB port?

I am desperate..
 
Did you try sending the program's output to a file in ASCII format and then using Notepad to print it out??
 
Dear rayleo,
I used a series of DBIII+ applications on a network for a large company for many years. Despite trying LPT1, LPT2, COM1 etc, they could not be made to print to any local printer. I asked the network gurus at the company and the network provider for a piece of code or whatever to make the applications print to the network printers. Despite much pressure, they never gave me an answer. I suspect that MiggyD's solution, whilst perhaps not elegant, may be the only way of achieving success.
GEMS
 
Rayleo,

I just read your other post back on 12/17/00 and it sounds like you mostly use DOS apps. Therefore, I thought you may use the following information.

To have NotePad print your ASCII file use:

! Notepad /p <filename.ext>

in your PRG's exiting routines <if you're using them>.

I'm pretty sure that'll do it. If the above does help you, then post something here and I'll try to get the registry key codes to remove the footers and headers from the printouts for you IF you are using WinNT (Build 4) [red]AND[/red] are using NotePad.

--MiggyD
 
WOW MiggyD - I like that Notepad idea. And then a light went off! I quickly typed in
Code:
! C:\PROGRA~1\MICROS~1\OFFICE~\EXCEL /p <filename>
And nothing happened. Then I recalled something about command lengths &amp; orders and I tried
Code:
! C:\PROGRA~1\MICROS~1\OFFICE~\EXCEL <filename> /p
And out of my USB hitched HP jet came the database file. But it doesn't work all the time! It's a more won't work than will work. The advantage would be that Excel prints out a tidy database file; Notepad is going to need header and tail trimming.
So, getting back to the initial problem Rayleo, could you use Excel to open and print out the database?
If you are using report form files - would you consider setting to an alternate text file and then use the notepad idea to get the final print from the text file.
GEMS :)
PS I hope someone can see why the excel command won't work properly - have I got something wrong somewhere?
 
Gems,

I just looked in my registry. Unfortunately, I have MS Works 2000 in which Excel is intergrated to this suite. This means that my &quot;Print&quot; key notation is as follows:

C:\Program Files\Microsoft Works\wksss.exe /p &quot;%1&quot;

and the &quot;Print To&quot; key notation is:

C:\Program Files\Microsoft Works\wksss.exe /f &quot;%1&quot; &quot;%2&quot; &quot;%3&quot; &quot;%4&quot;

as you can see, the worksheet's [red]print[/red] command line (in both instancesses) is that the parameters (&quot;/P&quot; or &quot;/F&quot;) come before the filename. Unlike your's that comes after the filename. So, I can't answer your question for you.

Anyone out there that has the stand-a-lone Excel program and can confirm GEM's question, please post your response here, 'cause now I'm interested as to &quot;why&quot; as well.

--MiggyD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top