Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print to a non-default printer
Message
From
16/11/2005 11:23:13
 
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01068774
Message ID:
01069336
Views:
20
>Hi all,
>
>I've got following problem:
>
>I'm trying to print a report to a printer shared on the network. Before I run the report command I do a 'set printer to' to that networkprinter, but the report is still printed to the local, default printer. How come ??
>
>Greetz,
>Hans

Hans,
I still fumble around with my coding so please, if I have made an error, forgive me.
Hi there. The following requires that you add the network printer (brother printer?) to the local machine.
Aprinter(la_PrtArray)
ln_len = alen(la_PrtArray)
for ln_count = 1 to ln_len step 1
     IF UPPER(SUBSTR(la_PrtArray[ln_count],1,7)) = "BROTHER" && Your printer name
	STORE PRINTSTATUS() TO llbrother
	IF NOT llbrother
		MESSAGEBOX("Brother printer is not found.",0)
	ELSE
		lcPrintName = "'"+la_prtarray[ln_count]+"'"  && Should be brother
		set printer to NAME &lcPrintName
		SELECT myprintcursor
		GOTO top
		REPORT FORM myreport TO PRINTER
	endif
     ENDIF
ENDFOR


SET PRINTER TO default  && Reset printer for next job
Thanks,

Chad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform