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!

opening a printer

Status
Not open for further replies.

fishman13

Programmer
Jul 8, 2002
73
0
0
US
I am trying to send information from a form to a printer, but cannot get the printer box displayed, or have the information go to the printer. I added messagebox commands to make sure the program is going were it is suppose to go, but it doesn't seen to work. The information is always displayed on the form.

if writedata = 1
messagebox("need to go to report")
if thisform.printeropen = .F.
messagebox("getting printer")
set device to printer prompt
thisform.printeropen = .T.
endif

? "Old Balance" + str(csr_bal.patient, 15,2) + ;
str(csr_bal.insur, 15,2) + ;
str(csr_bal.tot_account, 15,2) + ;
str(csr_bal.family, 15,2)
? "New Balance" + str(patbal, 15,2) + ;
str(insbal, 15,2) + ;
str(totbal, 15,2) + ;
str(fambal, 15,2)
endif
 
fisherman

Have you tried using
Code:
set printer to getprinter()
set device to printer
set printer on
 ?  "Old Balance"  +    str(csr_bal.patient, 15,2) + ;
                          str(csr_bal.insur, 15,2) + ;
                          str(csr_bal.tot_account, 15,2) + ;
                          str(csr_bal.family, 15,2)
   ?  "New Balance"  +    str(patbal, 15,2) + ;
                          str(insbal, 15,2) + ;
                          str(totbal, 15,2) + ;
                          str(fambal, 15,2) 
set printer to



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Mike,

I just tried that and it does bring up a printer window, however not the same window and my Foxpro reports. But the information still goes to the screen and not the printer.
 


Try :

@1,1 say "Old Balance" + str(csr_bal.patient, 15,2) + ;
str(csr_bal.insur, 15,2) + ;
str(csr_bal.tot_account, 15,2) + ;
str(csr_bal.family, 15,2)


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top