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

Problem with Printers!!! Please Help!

Status
Not open for further replies.

Serincino

Programmer
Jun 13, 2003
61
US
I am pulling service ticket information from several databases and placing them in a report to print the tickets. Below is my code.

SET PRINTER ON prompt
SELECT F
SET ORDER TO ledger
SELECT A
SET ORDER TO number
SET RELATION TO STR(number,6) INTO ledger1
SELECT D
SET ORDER TO number
SET RELATION TO number INTO master
SET FILTER TO month_due = FLOOR(VAL(thisform.txtmonth.Value))
months = thisform.txtmonth.Value
years = thisform.txtyear.Value
GO top
DO WHILE !EOF()
SELECT F
DO WHILE ledger1.number = br.number
SKIP
ENDDO
SKIP -1
SELECT D
REPORT FORM rptbrtickets NOCONSOLE RECORD RECNO() TO PRINTER
SKIP
ENDDO
IF MESSAGEBOX("Would you like to print more Contract Renewal Tickets?",36,"Print More?") = 6
thisform.clearfields
thisform.txtmonth.SetFocus
ELSE
thisform.clearfields
thisform.txtmonth.SetFocus
thisform.Hide
ENDIF

I have several printers on the network all shared. This report needs to be send to a different printer other than my default printer. But when the code runs it displays the prompt dialog box, I select the printer I want, but when the Report Form line executes it sends the report to my default printer. This is a problem because have seeral different types of tickets to print all going to different printers (each printer is setup with the correct paper form to print on for each job type). What am I doing wrong?? Please help. I've read through the syntax several times and can't find anything.

-Serincino
 
Serincino,

Basically, the problem occurs because the report settings have got themselves embedded in your FRX file. It is possible to clean the file, and that will get rid of the problem. For step-by-step instructions, see:

Mike


Mike Lewis
Edinburgh, Scotland
 
may be you can use this:

SET PRINTER TO NAME <windows printer name>
and then run the report
REPO FORM <my report> TO PRINTER
and thats it
if your network is NT 4.0 or later
SET PRINTER TO NAME \\server\printer
and then run the report
with this you only need to add the printer in windows and remeber the name to use in vfp.

hope this help you.
 
Thanks all. Set Printer to getprinter() works excellent.

-Serincino
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top