Historically (and I am getting old) I though it was considered bad form to print directly to a printer, but I guess that is old news! Ok, so I tried it and it worked....sort of. It went to the wrong network printer! My Server is sinclair3. It went to the printer called "MAIN" on sinclair3. It should be going to the printer called 'scripts'. The code that sent it to the wrong printer is...

PRINT ptscripxp WHERE patnumbr = .vpnum AND prntflag = 'Y' OPTION PRINTER +
   |PRINTER_NAME \\sinclair3\scripts

"MAIN" is the default printer for the pc I am working on, so apparently, the code is just sending it to the default printer.
How do I fix that?
And by the way...thanks for your help! I really appreciate it!

Rbase users ROCK!

Mike



Bob Thompson wrote:
My first question is why do you want to issue a DOS print command in 7.6?
You have so many options in the print function with 7.6!

To eliminate the need to use the file and print directly to the printer..

PRINT ptscripxp WHERE patnumbr = .vpnum AND prntflag = 'Y' +
OPTION PRINTER |COPIES 1|PRINTER_NAME \\MyServer\hp LaserJet 1320 PCL 6

will send your report directly to the printer without needing any dos file commands. (after printer name use the exact name of the printer as shown in your windows printers screen)

You can set all kinds of options! See PRINT help. No need to go to the old method.

-Bob






----- Original Message ----- From: "Michael Sinclair" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Sunday, January 06, 2008 4:48 PM
Subject: [RBASE-L] - Printing a Report to a file in RB 7.6 makes a 1 byte file


Hello again,

In Rbase for Windows ver 6.5, I could print a report to a file name, and the copy the file to a printer.
The code that worked in Version 6.5 is....

 erase c:\temp\script.txt
 OUTPUT c:\temp\script.txt
 PRINT ptscripxp WHERE patnumbr = .vpnum AND prntflag = 'Y'
 OUTPUT SCREEN
 zip CMD /C net use lpt3 /delete
 pause for 1
 zip CMD /C net use lpt3 \\sinclair3\scripts
 pause for 1
 copy c:\temp\script.txt lpt3
 pause for 1

(the extra pause for 1 seemed to be required to make it work)

In Version 7.6, the file c:\temp\script.txt gets made, but it is only 1 byte in size. When I run the code in Version 7.6, the report actually shows up on the screen.

Is there a way to do this in Ver 7.6?

Thanks for your help!

Mike




--
No virus found in this incoming message.
Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.13/1211 - Release Date: 1/6/2008 11:57 AM








Reply via email to