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