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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can I redirect my reports to a network printer ?

Status
Not open for further replies.

systema

Programmer
Jan 30, 2001
10
0
0
IT
Is there anyone who how to change the default printer in an EXE file ?

I tried the following:
SET PRINTER ON PROMPT
to choose the printer from the list
REPORT FORM xxxxx TO PRINTER NOCONSOLE
to print the report

The report is printed on the local printer instead the one I've chossen from the list.

many thanks
 
What version of FoxPro?, DOS, Win or Visual David W. Grewe
Dave@internationalbid.com
ICQ VFP ActiveList #46145644
 
I also forgot to ask you what type of Network.

Novell
1. You can redirect the the local printer port with the novell capture command.
2. Use the MSDN Knowledge base article on setting the windows printer to a network printer.
3. use the FoxPro command to redirect the output to a network printer.
Although SPOOLER must be included for compatibility, it is ignored. Any character string can be substituted. When using the options below, don't include any space between the clauses.
SET PRINTER TO[\\SPOOLER [\N] [\F=<expN>] [\B=<banner>] \C=<expN>] [\P=<expN>] [\S=<server>] [\Q=<queue>]]

MS-NT
1. Use the MSDN Knowledge base article on setting the windows printer to a network printer.
2. use the FoxPro command to redirect the output to a network printer.
The first format of the network SET PRINTER command spools printer output to a network printer. <machine name> is the network name assigned to your workstation. This name is assigned by the network administrator and must be unique. <printer name> is a name assigned to the printer and is also assigned by the network administrator. LPT1, LPT2 or LPT3 is used to identify the destination (<dest>) of the installed printer.
SET PRINTER TO [\\<machine name> \<printer name> = <dest>]
David W. Grewe
Dave@internationalbid.com
ICQ VFP ActiveList #46145644
 
Excuse me for the delay! The workstations are connected via LAN to both Novell and NT servers. The OS are Win95, Win98 and NT4. The application prints only on the default printer even if I choose another from the list of the ones available, while in my application. The only way to print on a network printer is to add the tag “PROMPT” after each REPORT-FORM statement or changing the default via “Printers Control Panel”. Thanks again.
 
If the above code does not help you, then there is something else wrong, Like the printer names on each indivudal computer is not the same name as the ones programmed into the application.
see thread184-51301 (fix Printer For Multiple Reports) in the VFP forum for a suggested solution to that problem David W. Grewe
Dave@internationalbid.com
ICQ VFP ActiveList #46145644
 
Hi,

I'm also trying to print on a (win 95) shared network printer from a Fox Pro 2.6 Win program.

The command &quot;set printer to \\...&quot; is not working at all. I've already checked printer name and everything else.

Have you discovered anything, systema?

Thanks!
 
Thanks, systema, but unfortunately my workstations are all Win95... :-(

Did you give up trying the &quot;set printer&quot; commands?

Bye.
 
If the workstation is runing win 3.1
I have used with Steven Sayers routine to read from the local win.ini
Change it, then print, then changes it back.

If the workstation is win95 or above.
I have found that nothing works except pausing the workstation and
then using the native printers control panel to change the printer.
This is because of the way Windows handles printers after win95
(The ini file is only used for backwards compatability)

Another thing that confused me was @say redirected reports may work
and report form reports may not.
I quess what I want to say is, I have tried to find ways to make printers
work and found that you must write code to test the operating system and
know the type of report before you can get reliable results.

Life was easier when you could simply issue a DOS run command
like RUN CAPTURE Q=PRINTQ_2 NB NFF TI=1

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top