Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adobe PDF
Message
From
29/04/2008 13:58:37
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01313973
Message ID:
01313976
Views:
10
I tried that. It worked for some machines but not others.

>>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:
>>
>lcPrinter = set('printer',3)
>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
>>	Set Printer To Name "ADOBE PDF"
>>Report Form avgrates To Print Noconsole
>set printer to name (m.lcPrinter)
>Set Printer To Name "ADOBE PDF"
>
>>Report Form avgrates2 To Print Noconsole
>set printer to name (m.lcPrinter)
>
>>
>>lcRecipientsCommaDelim = Strtran(lcEmail, ";", ",")
>>
>>llRetval = sendmail(lcRecipientsCommaDelim, lcSubject, ;
>>	lcMsgBody, lcAttachment, lcProxyName)
>>
>>*Set Printer To Default
>>_screen.MousePointer = 0
>>
>>Return llRetval
>
>
>If you would try to switch printer back ant forth in between as I put here would it work?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform