Very strange things going on here...
I used your technique to make sure I have the correct printer name. Does it matter if these are printers on a Novel server vs a Windows 2003 Server? Even so, I got the report to go the correct printer by having windows change the default printer (out side of windows). No matter what I do, the Rbase sends the report to the default printer! Could there be some lingering commands, left over from Rbase for DOS that are redirecting the output to the default printer and ignoring the Rbase print commands?
Mike

Bob Thompson wrote:
Mike,
 An accurate way to find the exact printer name you want is:

R>Prnsetup

This will display a pop up window in which you can manually select the exact printer you want.

Then enter ..

R>Set var x = (Cval('currentprinter'))
R>Sho var X
HP LaserJet 4100 Series PCL

This will display the exact name required to send to the printer you desire.

Note that you can also leave the "option printer" out and simply print to the screen as a preview. Then on the preview screen, you can click the printer icon and it will display all your available windows printers. I normally print to the screen first for the
user to review and then they can choose to send to the printer or not.

Give it a try!

-Bob




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


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










--
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