General information
Category:
Coding, syntax & commands
I am sending two reports to an Adobe PDF driver, and the second report freezes during the creation process. I don't know how to fix this. It doesn't happen on all computers.
Here's the code:
Try
Set Printer To Name "ADOBE PDF"
Catch To loError
=Messagebox(loError.Message, 16, "Printer Error")
llRetval = .F.
Endtry
If !llRetval
Return .F.
EndIf
lnCount = 1
Thisform.ofile.Open('emails')
Select email ;
From emails ;
Where avgrate = 1 ;
and !Empty(email) ;
Into Cursor curEmails
USE in emails
Select curEmails
Scan
If lnCount = 1
lcEmail = Alltrim(email)
lnCount = lnCount + 1
Else
lcEmail = lcEmail + "," + Alltrim(email)
lnCount = lnCount + 1
Endif
EndScan
Select curRatesheet
Report Form avgrates To Print Noconsole
Report Form avgrates2 To Print Noconsole
lcRecipientsCommaDelim = Strtran(lcEmail, ";", ",")
llRetval = sendmail(lcRecipientsCommaDelim, lcSubject, ;
lcMsgBody, lcAttachment, lcProxyName)
Set Printer To Default
_screen.MousePointer = 0
Return llRetval
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only